Add a compass rose overlay to indicate which direction is north
This commit is contained in:
@@ -255,6 +255,18 @@ google.maps.event.addListener(marker, 'click', function() {
|
|||||||
// initialize the markers and regions
|
// initialize the markers and regions
|
||||||
initMarkers();
|
initMarkers();
|
||||||
initRegions();
|
initRegions();
|
||||||
|
|
||||||
|
var compassDiv = document.createElement('DIV');
|
||||||
|
|
||||||
|
compassDiv.style.padding = '5px';
|
||||||
|
|
||||||
|
var compassImg = document.createElement('IMG');
|
||||||
|
compassImg.src="compass.png";
|
||||||
|
compassDiv.appendChild(compassImg);
|
||||||
|
|
||||||
|
map.controls[google.maps.ControlPosition.TOP_RIGHT].push(compassDiv);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
BIN
web_assets/compass.png
Normal file
BIN
web_assets/compass.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
Reference in New Issue
Block a user