Google Maps setCenter()

前端 未结 5 1372
予麋鹿
予麋鹿 2021-01-03 19:07

I\'m using google maps. In my code i\'ve used setCenter() function. My problem is that marker is always located on top left corner of map area (not at the center). Please te

5条回答
  •  悲&欢浪女
    2021-01-03 19:16

    I searched and searched and finally found that ie needs to know the map size. Set the map size to match the div size.

    map = new GMap2(document.getElementById("map_canvas2"), { size: new GSize(850, 600) });
    
    

提交回复
热议问题