You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.0 KiB
35 lines
1.0 KiB
//
|
|
//$LastChangedDate$
|
|
//$LastChangedRevision$
|
|
//$LastChangedBy$
|
|
//
|
|
|
|
import net.yacy.cora.protocol.RequestHeader;
|
|
import net.yacy.peers.graphics.OSMTile;
|
|
import net.yacy.visualization.RasterPlotter;
|
|
import de.anomic.server.serverObjects;
|
|
import de.anomic.server.serverSwitch;
|
|
|
|
public class osm {
|
|
|
|
public static RasterPlotter respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, @SuppressWarnings("unused") final serverSwitch env) {
|
|
|
|
int zoom = 10;
|
|
float lat = 50.11670f;
|
|
float lon = 8.68333f;
|
|
int width = 3;
|
|
int height = 3;
|
|
|
|
if (post != null) {
|
|
zoom = post.getInt("zoom", zoom);
|
|
lat = post.getFloat("lat", lat);
|
|
lon = post.getFloat("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);
|
|
}
|
|
|
|
} |