tombatossals / angular-openlayers-directive

AngularJS directive to embed an interact with maps managed by the OpenLayers library
http://tombatossals.github.io/angular-openlayers-directive/
MIT License
282 stars 183 forks source link

Https protocol option for Esri layer #386

Closed mfilotto closed 6 years ago

mfilotto commented 6 years ago

Would be nice to be able to activate https on Esri layers.

My use case: My app is in https so when I display an Esri layer I have these errors Mixed Content: The page at 'https://myapp.ovh/#/map' was loaded over HTTPS, but requested an insecure image 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/11/1153/1967'. This content should also be served over HTTPS.

juristr commented 6 years ago

@mfilotto Hey, definitely. Would you like to submit a pull request? The code line to change would be this one: https://github.com/tombatossals/angular-openlayers-directive/blob/33008fe81518564326b461d1c621104c4b27e43b/src/services/olHelpers.js#L393

mfilotto commented 6 years ago

Of course. Do you want me to hard code https url or add an option to switch between http and hhtps ?

juristr commented 6 years ago

I think we can hard-code it. Calling an https resource from an http site doesn't hurt, vice versa however you get the error you got 😄 . so I think we're fine hard-coding it for now. In case we can add configuration options later if needed.

thx 👍