Set Leaflet icon path explicitly.

When we tried to deploy maps on staging, we got the following error
message in our Javascript console:

Error: Couldn't autodetect L.Icon.Default.imagePath, set it manually.

... so we did. The end.
This commit is contained in:
Skud committed 2013-09-11 18:05:38 +10:00
1 parent a75ed5090a
commit 7e65af532d
1 file changed
+2
+2
View File
@@ -5,6 +5,8 @@ cloudmade_url = "http://{s}.tile.cloudmade.com/" + cloudmade_key + "/997/256/{z}
nominatim_base_url = 'http://nominatim.openstreetmap.org/search/';
nominatim_user_agent_email = "<%= Growstuff::Application.config.user_agent_email %>";
L.Icon.Default.imagePath = '/assets'
if (location.pathname === places_base_path) { //places index page
map = L.map('map').setView([0.0, -0.0], 2);
showMap(map);