Hi,

I am also facing a problem of setting a dynamic zoom level on Google
map.

I first set a reference point(x,y) and displays few markers{(x1,y1),
(x2,y2),(x3,y3),(x4,y4),(x5,y5)} up to a distance (say 50 km around
it). I set the map center  to the reference point. The screen
resolution is 1024 X 768.

If I set fixed zoom level, some times, some markers go beyond the 1024
X 768 area. Sometimes markers get condensed themselves around the
reference point. My problem is to show the most distant marker within
the maximum possible boundary of the 1024 X 768 area.

I follow these steps:

1. calculate differences of x-x1, x-x2, x-x3,.... (dx)
2. calculate differences of y-y1, y-y2, y-y3,.... (dy)
3. get max of dx => mdx
4. get max of dy => mdy
5. if mdx > mdy I am to display 2 times of mdx degrees in 1024 pixels
6. if mdx < mdy I am to display 2 times of mdy degrees in 768 pixels
7. if mdx = mdy consider any of 5. or 6.

I got stuck in steps 5 or 6. What is the relation between degree,
pixel and zoom level? How many pixels a degree spans at zoom level 1?
at zoom level 2? I go to Google earth. there is a scale to measure
distance between two points. But there is no zoom level to set. I go
to wikimapia, there is zoom level to set but no scale to measure
distance. Are the google map, google earth, wikimapia alike in terms
of scale and projection?

With regards,
Cryo

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to