From: Tom Hughes Date: Wed, 8 Aug 2007 16:57:09 +0000 (+0000) Subject: Use David Earl's arrow icon to show the position of a search result. X-Git-Tag: live~8320 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/5ffb6950cc3a688552290f9616c142e285b465b6?ds=sidebyside Use David Earl's arrow icon to show the position of a search result. --- diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 5488ba40d..32f95947a 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -100,7 +100,7 @@ if (marker) removeMarkerFromMap(marker); - marker = addMarkerToMap(centre); + marker = addMarkerToMap(centre, getArrowIcon()); } function updateLocation() { diff --git a/public/images/arrow.png b/public/images/arrow.png new file mode 100644 index 000000000..aa9b58fc2 Binary files /dev/null and b/public/images/arrow.png differ diff --git a/public/javascripts/map.js b/public/javascripts/map.js index 781ea5551..a48e71077 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -51,6 +51,14 @@ function getTileURL(bounds) { } } +function getArrowIcon() { + var size = new OpenLayers.Size(25, 22); + var offset = new OpenLayers.Pixel(-30, -27); + var icon = new OpenLayers.Icon("/images/arrow.png", size, offset); + + return icon; +} + function addMarkerToMap(position, icon, description) { var marker = new OpenLayers.Marker(position, icon);