2

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

Community
  • 1
  • 1
Ash
  • 33
  • 2
  • 4
  • Put up a jsfiddle that reproduces the problem and we will look at it. – MrUpsidown Apr 09 '14 at 16:40
  • This is a big project contains so many dependencies on so many things. I understand this is difficult to answer based on information i have provided. Will check if I can create some sample code. – Ash Apr 09 '14 at 18:03
  • 1
    Turned out to be a problem in my machine only. All other machine does not have any issue. – Ash Apr 10 '14 at 17:11

2 Answers2

0

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);
Wen
  • 2,227
  • 3
  • 24
  • 31
0

Try this:

google.maps.event.addDomListener(window, 'load', initialize);

to replac with:

$(document).ready(function(){
  initialize();
});
mmauzerr
  • 51
  • 1
  • 3