I’ve just started using the Angular Leaflet directive (http://tombatossals.github.io/angular-leaflet-directive/#!/) and I’m trying to integrate this within an Ionic project.
On the browser, everything works fine: the map tiles are loaded in. When I compile the app with XCode and run in within the iOS simulator, the tiles do not load as expected.
When I use the inspector, I noticed that the html for the tiles that are loaded in is of the following form:
<img class="leaflet-tile leaflet-tile-loaded" src="//b.tile.openstreetmap.org/18/131008/87171.png" style="height: 256px; width: 256px; left: 791px; top: -114px;">
Notice the protocol is missing with the src property. Within the Cordova wrapper, the app assumes that this should be file://, and naturally fails to load in the tiles.
Is there any way to either:
- Explicitly add the http:// protocol to the img src?
- Set Cordova to default to http:// with URI’s that start with //?
Also opened a GitHub issue: https://github.com/tombatossals/angular-leaflet-directive/issues/460