简体   繁体   English

隐藏用户的Bing地图坐标

[英]Hide Bing maps coordinates for the user

Is it possible to hide the Bing maps coordinates for the user ? 是否可以为用户隐藏Bing地图坐标?

This is my javascript code: 这是我的JavaScript代码:

var mapOptions = { credentials : "My app code here", zoom:@(Model.Sprint.ZoomFactor), center:new Microsoft.Maps.Location(latitude, longitude), showDashboard: false, disableUserInput: true, enableSearchLogo: false, enableClickableLogo: false };

In my html source, the coordinates become visible to the user but the user is not allowed to see where the exact location is. 在我的html源代码中,坐标对用户可见,但不允许用户查看确切位置。

Does anyone know how to hide them? 有谁知道如何隐藏它们?

Im using ASP.net MVC 3 so the coordinates come from a viewmodel. 我正在使用ASP.net MVC 3,因此坐标来自视图模型。

thanks. 谢谢。

As long as you are using the Bing maps javascript control, you cannot really hide this information from the user. 只要您使用的是Bing maps javascript控件,就无法真正向用户隐藏此信息。 The code is running on the user's machine, so how can you hide your source code and data from them? 代码在用户的计算机上运行,​​那么如何隐藏源代码和数据呢? If your requirement is that the coordinates should not be visible in the downloaded source code, you can try something similar to the Bing interactive SDK, where they use an ajax call issued by the client to obtain the map license key at run time. 如果您的要求是坐标在下载的源代码中不可见,则可以尝试类似于Bing交互式SDK的操作,在Bing交互式SDK中,它们使用客户端发出的ajax调用在运行时获取地图许可证密钥。 But this is easily defeated by stepping through the code using the javascript debugging feature on your browser. 但这很容易通过使用浏览器上的javascript调试功能逐步执行代码来克服。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM