sg

Çarşamba, Ocak 18, 2006

Re: In-between zoom levels


Wasn't it aihlmot@hotmail.com who wrote:
>
>Mike, brilliant work. Many thanks.
>
>I noticed that if you scroll horizontally to another "copy" of the
>photo, then the first change of zoom level doesn't preserve the
>center.

I guess that's because the GLatLng normalization takes place in
coordinate space and wrapTileX takes place in tilespace. Normally they
would be the same thing, but they're not in this case.

> But this isn't really a big deal because I plan on disabling
>horizontal wrapping and not allowing the user away from the "initial"
>"copy" of the image. Any ideas on keeping the horizontal wrapping and
>the padding quirk away from the user?

The best solution would be to re-slice the map, choosing the sizes so
that the image covers an integer number of tiles.

>
>(I'm tempted to "snap back" whenever the user moves the padding into
>view, but that doesn't work if the zoom is so far out that the image is
>smaller than the map. Also, some infowindows scroll the map.)
>
>Am I right in thinking that GLatLng(0,0) points to the center of the
>4368x2912 image? Where does GPoint(0,0) point to? Or does it depend
>on the zoom level?

I've tweaked things so that GLatLng(0,0) does indeed point to the centre
of the image. It has to move around tilespace as the padding size
changes with zoom level.

GPoint(0,0) points to GLatLng(90,-180), the top left corner of the
tilespace, and that's the magic point where the tilespace is pinned to
the coordinate space for all zoom levels. (For the Mercator projection,
the pixel represented by GPoint(0,0) always represents the geographical
location GLatLng(85.0511, -180), but I've used a Euclidean projection.)
In order to get GLatLng(0,0) to be the centre, I've had to arrange
things so that GPoint(0,0) is (728 pixels + half the padding) North of
the top left corner of the image.

--
The Blackpool Community Church Javascript Team
http://www.econym.demon.co.uk/googlemaps/

0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık