Generally this isn't possible: even if you were to write some JavaScript to obfuscate that value, anyone could just right-click on a tile and see the API key in its URL.
Leaflet JS: Hiding API key of map tile provider
Domanda
I know this may come off as a very noob question.
I'm using Leaflet JS for mapping purposes in my application. For the mapping tile providers, I setup both MapQuest and Cloudmade. Both of them have a format similar to
tileserver.com/SOME_PARAMS/API_KEY/TILE_NUMBERS
to fetch the appropriate tiles to show in the map container.
What I'm confused is how can I keep the tiling javascript API key hidden from end users?
Nessuna soluzione corretta
Altri suggerimenti
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow