Google map is not rendered fully in the div?

后端 未结 2 1285
忘了有多久
忘了有多久 2021-01-16 01:18

Here I have the map_canvas within a div called map. The thing is when I increase the width of the map, the

相关标签:
2条回答
  • 2021-01-16 01:41

    Have you checked that the width of the div container has been set? Also, has the width of the map been set in the mapOptions object?

    If you provide more examples of your code, it will be easier to help.

    0 讨论(0)
  • 2021-01-16 01:53

    The width of the map-area is increasing but the right side of the map is not rendering fully.

    When you change the size of the div, trigger the resize event on the map:

    from the documentation:

    Events

    resize - Developers should trigger this event on the map when the div changes size: google.maps.event.trigger(map, 'resize') .

    0 讨论(0)
提交回复
热议问题