[OpenLayers-Users] Bing Maps Key in Openlayers
Alex Rice
rice.guido at gmail.com
Tue Sep 3 07:56:18 PDT 2019
I am not sure about Bing Maps, but Mapbox allows access tokens to have
scope and domain restrictions, thus making it safe to use client-side
from javascript packages like openlayers (or mapbox-gl-js)
https://docs.mapbox.com/help/account/tokens/
https://docs.mapbox.com/mapbox-gl-js/example/simple-map/
On Tue, Sep 3, 2019 at 2:42 AM Geir Aalberg <geira at met.no> wrote:
>
> The canonical way of handling API keys is to set up a backend on your
> server which adds the keys and acts as a proxy. There is no secure way
> to hide API keys in Javascript apps on the browser.
>
> https://www.rockyourcode.com/secret-keys-in-react/
>
> -geir
>
>
> On 8/30/19 09:21, divya mittal wrote:
> > Hi,
> >
> > I have started using openlayers recently and using Bing maps as baselayer.
> >
> > While consuming Bing Maps I need to specify the key at the client side. Is
> > there a way out to hide the Bing map key ?
> >
> > Please advise.
> >
> > Thanks !
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/openlayers-users
--
Alex G Rice
rice.guido at gmail.com
+1 505-603-5639
More information about the Users
mailing list