Reputation: 33
I have been facing grey tiles problem in google map api v3. I have gmap and there are so many markers on it. Grey tiles appeared very frequently when zoom in/out or drag the map. I have been searching for the solution but did not find which will fix the problem. I have tried resize, tilesloaded, idle events to somehow change the center of the map, still no luck. I could not find a way to know whether all tiles have been loaded or not. tilesloaded fires only when all tiles are loaded.
So far I have looked at following links:
Any help in this regards is appreciated... Thanks, Ash
Upvotes: 2
Views: 3637
Reputation: 51
Try this:
google.maps.event.addDomListener(window, 'load', initialize);
to replac with:
$(document).ready(function(){
initialize();
});
Upvotes: 0
Reputation: 2237
I have same issue of not centring, and displays only part of map on map canvas.
This line fixed my problem:
google.maps.event.trigger(map, 'resize');
Put it after
marker = new google.maps.Marker({...});
before
map.setCenter(myLatlng);
map.setZoom(10);
Upvotes: 0