From d1ee7de08b0900713ca2cd6510ee6bd83bf1c240 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 10 Jun 2013 13:55:27 -0700 Subject: [PATCH] Restore attribution on main map --- app/assets/javascripts/index.js | 4 ++-- app/assets/javascripts/map.js.erb | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index e4dbb84d0..3edfaeeaf 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -12,13 +12,13 @@ $(document).ready(function () { var params = OSM.mapParams(); map = L.map("map", { - attributionControl: false, zoomControl: false, layerControl: false }); - layers = mapLayers(); + map.attributionControl.setPrefix(''); + layers = mapLayers(); layers[0].layer.addTo(map); $("#map").on("resized", function () { diff --git a/app/assets/javascripts/map.js.erb b/app/assets/javascripts/map.js.erb index 323d16378..a7e9f6f50 100644 --- a/app/assets/javascripts/map.js.erb +++ b/app/assets/javascripts/map.js.erb @@ -17,27 +17,29 @@ var objectLoader; function mapLayers() { return [{ - layer: new L.OSM.Mapnik(), + layer: new L.OSM.Mapnik({ + attribution: '' + }), keyid: "mapnik", layerCode: "M", name: I18n.t("javascripts.map.base.standard") }, { layer: new L.OSM.CycleMap( { - attribution: "Tiles courtesy of Andy Allan", + attribution: "Tiles courtesy of Andy Allan", }), keyid: "cyclemap", layerCode: "C", name: I18n.t("javascripts.map.base.cycle_map") }, { layer: new L.OSM.TransportMap({ - attribution: "Tiles courtesy of Andy Allan", + attribution: "Tiles courtesy of Andy Allan", }), keyid: "transportmap", layerCode: "T", name: I18n.t("javascripts.map.base.transport_map") }, { layer: new L.OSM.MapQuestOpen({ - attribution: "Tiles courtesy of MapQuest ", + attribution: "Tiles courtesy of MapQuest ", }), keyid: "mapquest", layerCode: "Q", -- 2.39.5