fkoessler
fkoessler

Reputation: 7257

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
  }
);

Upvotes: 0

Views: 2018

Answers (1)

Nicolas Boonaert
Nicolas Boonaert

Reputation: 2952

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:

Upvotes: 2

Related Questions