Question

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?

No correct solution

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top