yacy_search_server/htroot/osm.java
orbiter 3197ca42ed preparations to move the HTCache into cora:
- move the header framework classes to cora
- move the ARC caching classes to cora
- refactoring of code to call these classes from cora

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7068 6c8d7289-2bf4-0310-a012-ef5d649a1542
2010-08-23 12:32:02 +00:00

35 lines
1007 B
Java

//
//$LastChangedDate$
//$LastChangedRevision$
//$LastChangedBy$
//
import net.yacy.cora.protocol.RequestHeader;
import net.yacy.visualization.RasterPlotter;
import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
import de.anomic.yacy.graphics.OSMTile;
public class osm {
public static RasterPlotter respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
int zoom = 10;
double lat = 50.11670d;
double lon = 8.68333d;
int width = 3;
int height = 3;
if (post != null) {
zoom = post.getInt("zoom", zoom);
lat = post.getDouble("lat", lat);
lon = post.getDouble("lon", lon);
width = post.getInt("width", width);
height = post.getInt("height", height);
}
final OSMTile.tileCoordinates coord = new OSMTile.tileCoordinates(lat, lon, zoom);
return OSMTile.getCombinedTiles(coord, width, height);
}
}