bueno yo en el ejemplo de openlayers click probe a dejar asi
la funcion trigger, talvez funcione
trigger: function(e) {
var lonlat =
map.getLonLatFromViewPortPx(e.xy).clone().transform(map.getProjectionObject(),
new OpenLayers.Projection('EPSG:4326'));
alert("You clicked near " + lonlat.lat + ", " + lonlat.lon + "");
}
y si quieres pasar los datos a algo en la misma pagina usas algo asi
trigger: function(e) {
var lonlat =
map.getLonLatFromViewPortPx(e.xy).clone().transform(map.getProjectionObject(),
new OpenLayers.Projection('EPSG:4326'));
alert("You clicked near " + lonlat.lat + ", " + lonlat.lon + "");
document.getElementById(.......).value=lonlat.lon;
document.getElementById(.......).value=lonlat.lat;
}
donde los ........ es el elemento al que se desea llevar los datos
_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx_______________________________________________
Talk-co mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/talk-co