+ map = L.map("map", {
+ zoomControl: false,
+ layerControl: false
+ });
+
+ map.attributionControl.setPrefix('');
+
+ layers = [{
+ layer: new L.OSM.Mapnik({
+ attribution: '',
+ code: "M"
+ }),
+ keyid: "mapnik",
+ name: I18n.t("javascripts.map.base.standard")
+ }, {
+ layer: new L.OSM.CycleMap({
+ attribution: "Tiles courtesy of <a href='http://www.opencyclemap.org/' target='_blank'>Andy Allan</a>",
+ code: "C"
+ }),
+ keyid: "cyclemap",
+ name: I18n.t("javascripts.map.base.cycle_map")
+ }, {
+ layer: new L.OSM.TransportMap({
+ attribution: "Tiles courtesy of <a href='http://www.opencyclemap.org/' target='_blank'>Andy Allan</a>",
+ code: "T"
+ }),
+ keyid: "transportmap",
+ name: I18n.t("javascripts.map.base.transport_map")
+ }, {
+ layer: new L.OSM.MapQuestOpen({
+ attribution: "Tiles courtesy of <a href='http://www.mapquest.com/' target='_blank'>MapQuest</a> <img src='http://developer.mapquest.com/content/osm/mq_logo.png'>",
+ code: "Q"
+ }),
+ keyid: "mapquest",
+ name: I18n.t("javascripts.map.base.mapquest")
+ }];
+
+ layers[0].layer.addTo(map);
+
+ $("#map").on("resized", function () {
+ map.invalidateSize();
+ });
+
+ L.control.customZoom({position: 'topright'})
+ .addTo(map);
+
+ var uiPane = $('#map-ui')[0];