return false;
}
- var map = createMap("small_map", {
- layerControl: false,
- panZoomControl: false,
- attributionControl: false
+ var map = L.map("small_map", {
+ attributionControl: false,
+ zoomControl: false
+ }).addLayer(new L.OSM.Mapnik());
+
+ L.control.zoom({position: 'topright'})
+ .addTo(map);
+
+ $("#small_map").on("resized", function () {
+ map.invalidateSize();
});
var params = $("#small_map").data();
[params.maxlat, params.maxlon]);
map.fitBounds(bbox);
- addBoxToMap(bbox);
+
+ L.rectangle(bbox, {
+ weight: 2,
+ color: '#e90',
+ fillOpacity: 0
+ }).addTo(map);
$("#loading").hide();
$("#browse_map .geolink").show();
return remoteEditHandler(bbox);
});
- updatelinks(params.lon, params.lat, 16, null,
+ updatelinks(params.lon, params.lat, 16, null,
bbox.getWest(), bbox.getSouth(),
bbox.getEast(), bbox.getNorth(),
object);
object.version = params.version - 1;
}
- addObjectToMap(object, {
+ addObjectToMap(object, map, {
zoom: true,
callback: function(extent) {
$("#loading").hide();