//= require index/export
//= require index/key
//= require index/notes
+//= require index/map_ui
$(document).ready(function () {
var permalinks = $("#permalink").detach().html();
var marker;
var params = OSM.mapParams();
- var map = createMap("map");
+ var map = createMap("map", {
+ zoomControl: false,
+ layerControl: false
+ }, {
+ locateControl: true
+ });
+
+ L.control.zoom({position: 'topright'})
+ .addTo(map);
+
+ OSM.mapUI().addTo(map);
+
+ L.control.share({
+ getUrl: function(map) {
+ return setArgs('http://osm.org/', {
+ lon: map.getCenter().lng,
+ lat: map.getCenter().lat
+ });
+ }
+ }).addTo(map);
+
+ L.control.locate({
+ position: 'topright'
+ }).addTo(map);
L.control.scale().addTo(map);
}
if (params.object) {
- addObjectToMap(params.object, params.object_zoom);
+ addObjectToMap(params.object, { zoom: params.object_zoom });
}
handleResize();
}
if (data.type && data.id) {
- addObjectToMap(data, true);
+ addObjectToMap(data, { zoom: true, style: { opacity: 0.2, fill: false } });
}
if (marker) {