var params = OSM.mapParams();
var map = createMap("map");
+ map.events.register("moveend", map, updateLocation);
+ map.events.register("changelayer", map, updateLocation);
+
if (!params.object_zoom) {
if (params.bbox) {
var bbox = new OpenLayers.Bounds(params.minlon, params.minlat, params.maxlon, params.maxlat);
map.zoomToExtent(proj(bbox));
if (params.box) {
- $(window).load(function() { addBoxToMap(bbox) });
+ addBoxToMap(bbox);
}
} else {
setMapCenter(new OpenLayers.LonLat(params.lon, params.lat), params.zoom);
url += "/full";
}
- $(window).load(function() { addObjectToMap(url, params.object_zoom) });
+ addObjectToMap(url, params.object_zoom);
}
- map.events.register("moveend", map, updateLocation);
- map.events.register("changelayer", map, updateLocation);
-
- updateLocation();
handleResize();
$("#show_data").click(function (e) {