Event uploaded using Google Maps v3

I am trying to create a “Download images” message while loading fragments of a Google map. My implementation basically goes as follows:

  • When maptypeid_changed or downtime events fire , I display a downloadable message
  • The boot message is deleted as soon as the tagged event is fired

I ran into problems:

  • When tiles for a map are already loaded (say, in the cache or from a previous panning operation), a tagged event does not fire.
  • If the tiles to represent the map are not fully loaded, and I change the type of map, the particle-broken event fires twice. I set a workaround by setting a flag to see if the map-type event follows the change in the map type, and if not, the code discards the first label- separated event it receives after receiving the maptypeid_changed event.

Since there is no istilesloaded function, is there anyway, I can check if the tiles are loaded before displaying the downloaded message. Also, is there anyway around the double triggering of the tile event or do I have to use the drop approach?

+4
source share
1 answer

What I did in the past is that I set the “Download” message as the background image for the div map using CSS. Thus, the image is always displayed when there are no headers on top, which means that they are loading.

You can see how it works at http://geobetty.com/el-paso-tx/trail-map

My image is centered. If you want the loading message to appear wherever there is no name, just set the css background rule for this;

0
source

All Articles