X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4cc400de436a5dc33b66bc735b5fb6257e066a5a..d0b845fc6025f2fb84a4cf4fa10cbb71084843a7:/app/views/user/_friend_map.rhtml?ds=sidebyside diff --git a/app/views/user/_friend_map.rhtml b/app/views/user/_friend_map.rhtml index fd86ab10c..c6d5f8afe 100644 --- a/app/views/user/_friend_map.rhtml +++ b/app/views/user/_friend_map.rhtml @@ -45,18 +45,20 @@ setMapCenter(centre, zoom); <% if marker %> - marker = addMarkerToMap(new OpenLayers.LonLat(<%= mlon %>, <%= mlat %>), null, "Your location"); + marker = addMarkerToMap(new OpenLayers.LonLat(<%= mlon %>, <%= mlat %>), null, "<%= t 'user.friend_map.your location' %>"); <% end %> var near_icon = OpenLayers.Marker.defaultIcon(); near_icon.url = OpenLayers.Util.getImagesLocation() + "marker-green.png";; var i = nearest.length; while( i-- ) { - var description = 'Nearby mapper: '+nearest[i].display_name+'' + var description = '<%= t 'user.friend_map.nearby mapper'%>'+nearest[i].display_name+'' var nearmarker = addMarkerToMap(new OpenLayers.LonLat(nearest[i].home_lon, nearest[i].home_lat), near_icon.clone(), description); } - map.events.register("click", map, setHome); + if (document.getElementById('updatehome')) { + map.events.register("click", map, setHome); + } } function setHome( e ) { @@ -73,7 +75,7 @@ removeMarkerFromMap(marker); } - marker = addMarkerToMap(merc, null, "Your location"); + marker = addMarkerToMap(lonlat, null, "<%= t 'user.friend_map.your location' %>"); } }