mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-23 23:38:23 -04:00
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:
1 parent
a75ed5090a
commit
7e65af532d
1 file changed
+2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user