Google map is not rendered fully in the div?

后端 未结 2 1286
忘了有多久
忘了有多久 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: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') .

提交回复
热议问题