How can I display a full screen google map with jQuery Mobile?

前端 未结 4 2045
無奈伤痛
無奈伤痛 2021-01-18 06:05

The following code displays strange output. I should see a full screen mobile map. But for some reason it shows on just a portion of the screen. I am using jquery.ui

4条回答
  •  走了就别回头了
    2021-01-18 06:36

    The container and map canvas need to be 100% width and height.

    From the jQuery mobile website their structure is:

    Maps

    And the CSS:

    #map-page, #map-canvas { width: 100%; height: 100%; padding: 0; }
    

    From here: http://view.jquerymobile.com/master/demos/examples/maps/geolocation.php

提交回复
热议问题