sg

Çarşamba, Kasım 23, 2005

Re: Errors on "this.topLeftTile" when initial map.centerAndZoom not done


Wasn't it carto.net@gmail.com who wrote:
>
>btw i definitely don't do any centerAndZoom() before adding because
>these coords are a result of the loaded XML, thus the problem cannot be
>here. (i just init my map object and add some controls before adding
>points throgh XMLHttpRequest/Microsoft.XMLHTTP).

That's exactly the problem. map.addOverlay() relies on some map
properties that only get created when the map is centred and zoomed or
when the map type is changed.

You need to perform a temporary map.centerAndZoom() to initialize the
required properties of the map. The details of the position and zoom
level don't matter because you'll countermand them with the real values
after you've added the points but before the browser gets a chance to
fetch the map tiles.

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