Reputation: 13
I am building a web page using custom tiles and the Google Maps interface, along with Google Fusion Tables. The map background image is that of the map, seen at the zoom level that the page is initialized with. If there are no data tiles to show, I see the background image at this zoom level. My map tiles do not span the entire range of latitudes, so something must be shown when data are missing.
It is a little hard to explain, but you can see the effect on my site when you zoom out and pan around: http://astro.phys.wvu.edu/wise/
I tried removing the fusion tables display and explicitly setting the tile background color. Has anyone seen this before? My guess is that I am setting the tiles as overlay with no background image, but in that case I do not know how to fix it. I am using Google maps v3. I followed the Google moonmap example here: https://developers.google.com/maps/documentation/javascript/examples/maptype-image
Thanks in advance.
Upvotes: 1
Views: 1043
Reputation: 117324
It's not a background-image, this "background" is made of tiles too.
You are calling initialize 2 times:
<body onload="initialize()">
google.maps.event.addDomListener(window, 'load', initialize);
remove one of these calls.
I can't tell you exactly what's going on there, but I guess the reason is the fact that many of the API-methods run asynchronously. It seems that when initialize
has been called the 2nd time there is still the process running that creates the elements used for the ImageMapType of the map that has been created in the 1st call(but these element will not accessed later by the map, so they keep their initial state...position and zoom) .
I would call it a bug, when the Maps-instance has been overwritten there shouldn't be any elements used by the previous instance present anymore.
Upvotes: 1