简体   繁体   中英

Hide Bing maps coordinates for the user

Is it possible to hide the Bing maps coordinates for the user ?

This is my javascript code:

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.

Does anyone know how to hide them?

Im using ASP.net MVC 3 so the coordinates come from a viewmodel.

thanks.

As long as you are using the Bing maps javascript control, you cannot really hide this information from the user. 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. But this is easily defeated by stepping through the code using the javascript debugging feature on your browser.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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