0

regin click should show clicked spot in xyz not lat/lng

This commit is contained in:
Michael Writhe
2011-05-11 15:36:39 -06:00
parent 5a483ba4cc
commit ec6fb82c7f

View File

@@ -775,9 +775,11 @@ var overviewer = {
overviewer.collections.infoWindow.close(); overviewer.collections.infoWindow.close();
} }
// Replace our Info Window's content and position // Replace our Info Window's content and position
var point = overviewer.util.fromLatLngToWorld(event.latLng.lat(),event.latLng.lng());
var contentString = '<b>Region: ' + shape.name + '</b><br />' + var contentString = '<b>Region: ' + shape.name + '</b><br />' +
'Clicked Location: <br />' + event.latLng.lat() + ', ' + 'Clicked Location: <br />' + Math.round(point.x,1) + ', ' + point.y
event.latLng.lng() + '<br />'; + ', ' + Math.round(point.z,1)
+ '<br />';
infowindow.setContent(contentString); infowindow.setContent(contentString);
infowindow.setPosition(event.latLng); infowindow.setPosition(event.latLng);
infowindow.open(overviewer.map); infowindow.open(overviewer.map);