Hello, I have the code:
............
<p><form method="post">
<input type="button" value="Refresh"
onclick="map.returnToSavedPosition()">
</form></p>
.............
map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(lat,lng), 10);
map.enableScrollWheelZoom();
map.savePosition();
geocoder = new GClientGeocoder();
...................
function getLatLng (point) {
var matchll = /\(([-.\d]*), ([-.\d]*)/.exec( point );
if ( matchll ) {
lat = parseFloat( matchll[1] );
lng = parseFloat( matchll[2] );
lat = lat.toFixed(6);
lng = lng.toFixed(6);
} else {
var message = "<b>Error extracting info from</b>:" + point +
"";
var messagRoboGEO = message;
}
return new GLatLng(lat, lng);
}
function searchPlace(place) {
if (geocoder) {
geocoder.getLatLng(place, function(point) {
if (!point) {
alert(place + " not found");
} else {
var latLng = getLatLng (point);
var info = "<h3>"+place+"</h3>Latitude: "+latLng.lat()+"
Longitude:"+latLng.lng();
map.setCenter(new GLatLng(lat,lng), 10);
map.savePosition();
...............
so when I type coordiates or a placename then it finds it and turns at
the same place if I make reload, but if I drag or zoom the map it
does't save it and doesn't return to that place when I make refresh.
Can you help me?
Thanks!!!!!!!!!!!!!!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---