Began code for feature lookup: implemented code to respond to mouse click and latlon to non spherical Mercator (for the postgis database)

This commit is contained in:
Nick Whitelegg 2008-01-07 20:25:12 +00:00
parent f29300bf1a
commit 2e03861300
4 changed files with 62 additions and 3 deletions

View file

@ -115,11 +115,20 @@ by the OpenStreetMap project and it's contributors.
map.events.register("moveend", map, updateLocation);
map.events.register("changelayer", map, updateLocation);
map.events.register("click", map, mapClick);
updateLocation();
handleResize();
}
// Map click results in feature lookup
function mapClick(e) {
var pos = lonLatToNonSphericalMercator
(mercatorToLonLat
(map.getLonLatFromViewPortPx
( map.events.getMousePosition(e))));
}
function getPosition() {
return mercatorToLonLat(map.getCenter());
}