JQuery Mobile and Google Maps Not Rendering Correctly

后端 未结 5 2018
星月不相逢
星月不相逢 2021-02-06 00:22

I am simply trying to display a google map within a jquery mobile page. If I load the page directly it works. However, if I navigate to the page from another page it only rend

5条回答
  •  醉梦人生
    2021-02-06 01:01

    You have and at 100% size, but not the

    s in the hierarchy between and
    .

    Try adding those to your CSS as well (the content one will need an id).

    You may also need to ensure that the API knows the size of the map

    by triggering a resize event when everything is ready. Showing only a single tile is a classic symptom of the API getting it wrong (and generally assuming it has zero size).

提交回复
热议问题