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:
parent
f29300bf1a
commit
2e03861300
4 changed files with 62 additions and 3 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue