简体   繁体   中英

Bing Maps: how to get rid of names and borders

I want to embed a satellite Bing map without country / city information and without borders, basically I only want the satellite photos and add my custom pins. Is there a way to do that?

Right now, I create my map with:

var map = new Microsoft.Maps.Map(document.getElementById("bMap"),
  {
      credentials:"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      center: new Microsoft.Maps.Location(35.173808, 90.402344),
      mapTypeId: Microsoft.Maps.MapTypeId.birdseye,
      zoom: 3,
      disableZooming: true,
      showCopyright: false,
      showDashboard: false,
      enableSearchLogo: false
  }
);

For sure, you can use the mapTypeId property in the mapOption and replace your line:

mapTypeId: Microsoft.Maps.MapTypeId.birdseye,

By this line:

mapTypeId: Microsoft.Maps.MapTypeId.aerial,

See the MSDN for reference: http://msdn.microsoft.com/en-us/library/gg427625.aspx

Also, in combination, you need to configure the label information by using the labelOverlay property:

var mapOptions =  
{ 
   credentials:"Your Bing Maps Key", 
   mapTypeId: Microsoft.Maps.MapTypeId.aerial, 
   center: new Microsoft.Maps.Location(37.794973,-122.393542), 
   zoom: 17, 
   labelOverlay: Microsoft.Maps.LabelOverlay.hidden 
} 

//Load the map
var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), mapOptions );

Here is the MSDN reference:

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