angular-ui / ui-leaflet

AngularJS directive to embed an interact with maps managed by Leaflet library
http://angular-ui.github.io/ui-leaflet
Other
314 stars 134 forks source link

Tiles Not Loading on Mobie Device #119

Open nmccready opened 9 years ago

nmccready commented 9 years ago

From @mdridley on September 28, 2015 19:12

Everything works fine until I try using this on a device, then I get everything but the map tiles and no error messages.

I tried whitelisting everything: $sceDelegateProvider.resourceUrlWhitelist([ // Allow same origin resource loads. 'self', 'https://csi.gstatic.com/', 'http://a.tile.openstreetmap.org/', 'http://b.tile.openstreetmap.org/', 'http://c.tile.openstreetmap.org/']);

And I added the iOS9 Transport security workaround.

No luck. Anything else that I might be missing?

Using iPhone 6, iOS9

Copied from original issue: tombatossals/angular-leaflet-directive#963

nmccready commented 9 years ago

From @mdridley on September 28, 2015 21:10

Had someone help me with the fix. Appears that if you specify the tiles source directly, the tiles will load correctly.

angular.extend($scope, { center: { autoDiscover: true, zoom: 12 }, tiles: { url: "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" } });

nmccready commented 9 years ago

From @ManuelRauber on October 18, 2015 12:12

You need to use a https:// endpoint for loading the tiles. You can try https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png for tiles.