[OpenLayers-Users] New fonction.. a "Go to!" button... But how can I do this?

DamienD damien.devismes at hotmail.fr
Mon Jul 23 11:52:17 EDT 2007


I'm a beginner to javascript, so I ask you to help me to realize this idea...
I'm trying to realize an action wich allow the user to put the coordinates
in 2 fields (for latitude & longitude in wgs84, decimal degree) and with a
button center and zoom the Openlayers' map to this point.
Another thing, i want to center the map without change the page, in the same
way as the geonames tools (Chercher une commune :) in 
http://www.opengeoportail.fr the excellent opengeoportail  

so in my html page, i 've written this:
<FORM name="coord">
    latitude : <INPUT type="text" name="lat" value="">
    longitude : <INPUT type="text name="long" value="">
    <INPUT type="button" value="Go to this point!"
onclick="viewonmap(lat,long)">
</FORM>

and before in a script..., i was trying to write a Javascript fonction with
something like this within...

function viewonmap() {
...
.... "javascript:changezoom(' + lat + ',' + long + ',13);"...
...
}

But really, i'm a beginner and i don't know how to do after, so I need your
help. 
Thanks to all.
-- 
View this message in context: http://www.nabble.com/New-fonction..-a-%22Go-to%21%22-button...-But-how-can-I-do-this--tf4130747.html#a11747253
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list