On 8 Feb., 18:25, Rossko <[email protected]> wrote:
> > But cases I intend to detect are more like zoom situations in which,
> > for example, the whole american continent is visible in the west, then
> > going east the whole of Africa, Europa, Asia and Australia is visible
> > and then in the rightmost area of the visible map America appears
> > again.
>
> The extra detail simplifies things considerably...
> Find out the width in pixels
> Find out pixels-per-degree at the equator for the given zoom level.
> Divide to find out if more than 360 degrees in view.

Thank you for your help so far. Starting from what you wrote I tried
the following:

 function mapWraps(){
   var mapWidth = map.getSize().width;
   var proj = map.getCurrentMapType().getProjection();
   var wrapWidth = proj.getWrapWidth(map.getZoom());

   if (mapWidth > wrapWidth) return true;
   else return false;
 }

That is, I compared the width of my map window to the width of the map
of the entire Earth, given the current map type and the current zoom
level.

Nevertheless, I would like to understand your suggestion completely. I
looked for a way to get the pixels-per-degree at the equator but
merely found a hint to do this using
map.getCurrentMapType().pixelsPerLonDegree[zoom]. This array seems not
to exist any more in the current API. So, how would I get the pixels-
per-degree, then?

Florian

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