Hi All,
I am new here and need to know new co-ordinate position if map is
zoomIn one level. For this I am doing a complex calculation in
JavaScript.
Can anybody tell me some simple JavaScript call other than this. I am
using JavaScript in Obj C and if goggle is providing some
staticZoomMatrix like:
newPoint = oldPoint * staticZoomMatrix then definitely I will
appreciate.
---------------------------
My JS function:
function zoomTo(x,y,locationString){
try{
var zoom = map.getZoom();
var pointArray = eval(locationString);
var locationArray = new Array();
var numPoints = pointArray.length;
var pt = map.fromLatLngToDivPixel(map.getCenter());
for(var i=0;i<numPoints;i++)
{
pt.x = pointArray[i][0];
pt.y = pointArray[i][1];
locationArray[i] = map.fromDivPixelToLatLng(pt);
}
setCenterPoint(x,y);
zoom++;
map.setCenter(map.getCenter(), zoom);
for(var i=0;i<numPoints;i++)
{
pointArray[i] =
map.fromLatLngToDivPixel(locationArray[i]);
}
return ""+pointArray;
}
catch(error){
return false;
}
}
---------------------------------
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---