Use David Earl's arrow icon to show the position of a search result.
This commit is contained in:
parent
6706ca3c50
commit
5ffb6950cc
3 changed files with 9 additions and 1 deletions
|
@ -100,7 +100,7 @@
|
|||
if (marker)
|
||||
removeMarkerFromMap(marker);
|
||||
|
||||
marker = addMarkerToMap(centre);
|
||||
marker = addMarkerToMap(centre, getArrowIcon());
|
||||
}
|
||||
|
||||
function updateLocation() {
|
||||
|
|
BIN
public/images/arrow.png
Normal file
BIN
public/images/arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue