]> git.openstreetmap.org Git - rails.git/commitdiff
Use David Earl's arrow icon to show the position of a search result.
authorTom Hughes <tom@compton.nu>
Wed, 8 Aug 2007 16:57:09 +0000 (16:57 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 8 Aug 2007 16:57:09 +0000 (16:57 +0000)
app/views/site/index.rhtml
public/images/arrow.png [new file with mode: 0644]
public/javascripts/map.js

index 5488ba40d5cd85d233dde442e5c31cfc3f9dc35d..32f95947ac60217332eee06f3f093227555cbd80 100644 (file)
     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 (file)
index 0000000..aa9b58f
Binary files /dev/null and b/public/images/arrow.png differ
index 781ea5551de36d67030e872cc07ae3a1dac7f05f..a48e71077093496cb5c0b11f985d96b63bdd29dc 100644 (file)
@@ -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);