Hello everybody.
I'm building an application with goglemaps v3, but I'm having serious
difficulties in centering the map on some displayed polygons/
polylines.
I get polygons and polylines from data stored in a MySQL db, wich I
convert in js arrays by js.
I tried to loop these arrays with the following function:
function dbFormat2gmapsArray(db){
var gmap=new Array();
var arr=db.split(";");
for(i=0; i<arr.length; i++){
var arr2=arr[i].split(",");
gmap[i]=new google.maps.LatLng(arr2[0], arr2[1]);
bounds.extend(new google.maps.LatLng(gmap[i]));
}
return gmap;
}
and tried to add map.fitBounds(bounds); before the return statement,
but it doesn't work.
Do I miss anything.
Thank you all
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.