Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道这可能是一个非常菜鸟的问题。
我在我的应用程序中使用 Leaflet JS 进行映射。对于地图贴图提供者,我设置了 MapQuest 和 Cloudmade。它们都具有类似于
tileserver.com/SOME_PARAMS/API_KEY/TILE_NUMBERS
获取适当的图块以显示在地图容器中。
我感到困惑的是,我怎样才能让最终用户隐藏平铺 javascript API 密钥?
通常这是不可能的:即使您要编写一些 JavaScript 来混淆该值,任何人都可以右键单击磁贴并在其 URL 中看到 API 密钥。