+//= depend_on application.yml
+
OSM = {
<% if defined?(PIWIK) %>
PIWIK: <%= PIWIK.to_json %>,
OVERPASS_URL: <%= OVERPASS_URL.to_json %>,
NOMINATIM_URL: <%= NOMINATIM_URL.to_json %>,
+<% if defined?(MAPQUEST_KEY) %>
+ MAPQUEST_KEY: <%= MAPQUEST_KEY.to_json %>,
+<% end %>
+<% if defined?(MAPZEN_VALHALLA_KEY) %>
+ MAPZEN_VALHALLA_KEY: <%= MAPZEN_VALHALLA_KEY.to_json %>,
+<% end %>
+
MARKER_GREEN: <%= image_path("marker-green.png").to_json %>,
MARKER_RED: <%= image_path("marker-red.png").to_json %>,
- MARKER_ICON: <%= image_path("marker-icon.png").to_json %>,
- MARKER_ICON_2X: <%= image_path("marker-icon-2x.png").to_json %>,
- MARKER_SHADOW: <%= image_path("marker-shadow.png").to_json %>,
+
+ MARKER_ICON: <%= image_path("images/marker-icon.png").to_json %>,
+ MARKER_ICON_2X: <%= image_path("images/marker-icon-2x.png").to_json %>,
+ MARKER_SHADOW: <%= image_path("images/marker-shadow.png").to_json %>,
NEW_NOTE_MARKER: <%= image_path("new_note_marker.png").to_json %>,
OPEN_NOTE_MARKER: <%= image_path("open_note_marker.png").to_json %>,
j = pair.indexOf('='),
key = pair.slice(0, j),
val = pair.slice(++j);
- params[key] = decodeURIComponent(val);
+
+ try {
+ params[key] = decodeURIComponent(val);
+ } catch (e) {
+ // Ignore parse exceptions
+ }
}
return params;