Google maps has grey section

若如初见. 提交于 2019-12-23 06:09:10

问题


I am working on a web application using PHP Laravel framework, javascript and jQuery.

I am working on the integration with google maps API via Javascript but I have strange behavior as shown in the picture

I don't know why I have the grey section in this strange way

here is my js code

 var map = new google.maps.Map(document.getElementById('my_map'), {
 center: {lat: -34.397, lng: 150.644},
 scrollwheel: false,
 zoom: 8
});

Any help will be appreciated , Thanks in advance


回答1:


check on of the following solutions:

  • check the position of map container ;
  • increase z-index of map container;
  • try to clear browser cache press CTRl+Shift+Delete if you are using Chrome
  • try it on another browser



回答2:


It was a caching problem, After I revert to the basic sample mentioned above I'd have to clear cache and it now working perfectly



来源:https://stackoverflow.com/questions/34926029/google-maps-has-grey-section

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!