0

I have a problem with my mobile app in ionic. I must to display a leaflet map with openstreetmap on mobile device, but I have a blank map, it's a white page whereas it works on the browser, why ?

I have not networks errors, I have only a white page on my mobile device. I use IonicDevApp.

In my HTML index:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="Content-Security-Policy" content="default-src *; img-src * 'self' data: https:; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src  'self' 'unsafe-inline' *">

For the style of my map:

#map {
  height: 100%;
  width: 100%;
}

I my Config.xml :

<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
Rubs
  • 1
  • Possible duplicate of [How to get a leaflet map canvas to have a 100% height?](https://stackoverflow.com/questions/37588601/how-to-get-a-leaflet-map-canvas-to-have-a-100-height) – IvanSanchez May 02 '19 at 06:24
  • This is one more case of "100% height in CSS means 100% of the height of the parent element, which most probably has no explicit height itself so it takes the default of zero" – IvanSanchez May 02 '19 at 06:26

0 Answers0