From 95360d9fbfb32b53bf5220dc54dc6dc10bada3bd Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 4 Jan 2012 00:02:34 +0000 Subject: [PATCH 1/1] User getImageLocation to get the URLs for markers --- app/views/export/start.js.erb | 2 +- app/views/user/_map.html.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/export/start.js.erb b/app/views/export/start.js.erb index 5a48dba25..79d0db4a9 100644 --- a/app/views/export/start.js.erb +++ b/app/views/export/start.js.erb @@ -124,7 +124,7 @@ function startMarker() { markerLayer = new OpenLayers.Layer.Vector("",{ displayInLayerSwitcher: false, style: { - externalGraphic: OpenLayers.Util.getImagesLocation() + "marker.png", + externalGraphic: OpenLayers.Util.getImageLocation("marker.png"), graphicXOffset: -10.5, graphicYOffset: -25, graphicWidth: 21, diff --git a/app/views/user/_map.html.erb b/app/views/user/_map.html.erb index 6f192931f..eb99f4372 100644 --- a/app/views/user/_map.html.erb +++ b/app/views/user/_map.html.erb @@ -52,7 +52,7 @@ end <% nearest = @user.nearby - friends %> var near_icon = OpenLayers.Marker.defaultIcon(); - near_icon.url = OpenLayers.Util.getImagesLocation() + "marker-green.png"; + near_icon.url = OpenLayers.Util.getImageLocation("marker-green.png"); <% nearest.each do |u| %> addMarkerToMap(new OpenLayers.LonLat( <%= u.home_lon %>, <%= u.home_lat %>), near_icon.clone(), @@ -61,7 +61,7 @@ end <% end %> var friend_icon = OpenLayers.Marker.defaultIcon(); - friend_icon.url = OpenLayers.Util.getImagesLocation() + "marker-blue.png"; + friend_icon.url = OpenLayers.Util.getImageLocation("marker-blue.png"); <% friends.each do |u| %> addMarkerToMap(new OpenLayers.LonLat( <%= u.home_lon %>, <%= u.home_lat %>), friend_icon.clone(), -- 2.43.2