diff --git a/app/assets/javascripts/places.js.erb b/app/assets/javascripts/places.js.erb index 9efeb945d..988978f99 100644 --- a/app/assets/javascripts/places.js.erb +++ b/app/assets/javascripts/places.js.erb @@ -1,7 +1,7 @@ places_base_path = "/places"; things_to_map = location.pathname + '.json'; -cloudmade_key = "<%= Growstuff::Application.config.cloudmade_key %>"; -cloudmade_url = "http://{s}.tile.cloudmade.com/" + cloudmade_key + "/73038/256/{z}/{x}/{y}.png"; +mapbox_map_id = "<%= Growstuff::Application.config.mapbox_map_id %>"; +base_url = "https://c.tiles.mapbox.com/v3/" + mapbox_map_id + "/{z}/{x}/{y}.png"; nominatim_base_url = 'http://nominatim.openstreetmap.org/search/'; nominatim_user_agent_email = "<%= Growstuff::Application.config.user_agent_email %>"; @@ -26,8 +26,8 @@ if (location.pathname === places_base_path) { //places index page } function showMap(map) { - L.tileLayer(cloudmade_url, { - attribution: 'Map data © OpenStreetMap contributors under ODbL | Map imagery © Cloudmade', + L.tileLayer(base_url, { + attribution: 'Map data © OpenStreetMap contributors under ODbL | Map imagery © Mapbox', maxZoom: 18 }).addTo(map); markers = new L.MarkerClusterGroup({showCoverageOnHover: false}); diff --git a/config/application.rb b/config/application.rb index 682afff71..bfa1fee4b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -89,7 +89,6 @@ module Growstuff Gibbon::API.timeout = 10 Gibbon::API.throws_exceptions = false config.newsletter_list_id = ENV['GROWSTUFF_MAILCHIMP_NEWSLETTER_ID'] - config.cloudmade_key = '29a2d9e3cb3d429490a8f338b2388b1d' # This is Growstuff's global Cloudmade key. If you fork Growstuff for # another project/website not run by the folks at http://growstuff.org/, diff --git a/config/environments/development.rb b/config/environments/development.rb index 76001c3fe..737fe3ec1 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -54,6 +54,8 @@ Growstuff::Application.configure do config.host = 'localhost:8080' config.analytics_code = '' + config.mapbox_map_id = 'growstuff.i3n2il6a' + config.after_initialize do ActiveMerchant::Billing::Base.mode = :test paypal_options = { diff --git a/config/environments/production.rb b/config/environments/production.rb index dd083c726..7e2261f7a 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -86,6 +86,8 @@ Growstuff::Application.configure do eos + config.mapbox_map_id = 'growstuff.i3n2c4ie' + config.after_initialize do ActiveMerchant::Billing::Base.mode = :production paypal_options = { diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 3ddce2c31..1a7b996b0 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -82,6 +82,8 @@ Growstuff::Application.configure do config.host = 'dev.growstuff.org' config.analytics_code = '' + config.mapbox_map_id = 'growstuff.i3n2hao7' + config.after_initialize do ActiveMerchant::Billing::Base.mode = :test paypal_options = {