Crater Lake National Park

NPMap

Digital maps for the National Park Service

Bing Base API

As a user of the NPMap library, you are responsible for complying with the terms of service for whichever base API(s) and base map/geocoding/routing services you consume in your map.

NPMap uses version 7 of the Bing Maps AJAX Control. You can view the full API documentation for the control on the MSDN website: http://msdn.microsoft.com/en-us/library/gg427610.aspx.

Pros and Cons

Here is a list of some of the strengths and weaknesses of the bing base API. This is an opinionated take based on our own experience working with the library.

Pros:

  • Enterprise support
  • Well-documented API
  • High-resolution (including oblique) imagery
  • Accurate and extensive transportation data
  • Advanced geocoding and routing engines
  • Cartographically-pleasing streets base map
  • Access to Locations, Imagery, Routes, and Traffic data through the Bing Maps REST services

Cons:

  • Somewhat buggy map control
  • Terms of Use restrict other aerial base maps (e.g. aerial imagery from Esri, MapBox, or MapQuest) from being used
  • Smaller, less active, developer community
  • Closed source means it is more difficult to extend the out-of-the-box functionality
  • Limited "official" browser support

Licensing

The National Park Service (NPS) has an enterprise license agreement with Microsoft that allows for the usage of the Bing Maps API and its associated services on both internal and public-facing NPS websites. If you are not an NPS employee, partner, or contractor, you cannot use the National Park Service's enterprise license.

Credentials

NPS Employees, Partners, and Contractors:

If you are an NPS employee, partner, or contractor, you do not need to worry about specifying your own Bing Maps credentials; NPMap takes care of this for you. If you want to use the Bing Maps API outside of the NPMap library, contact the NPMap team (npmap@nps.gov) for instructions on authorizing your web map.

Everyone Else:

If you are not an NPS employee, partner, or contractor, you must specify your own Bing Maps credentials in the NPMap.config object. Here's how: Go to http://www.bingmapsportal.com/ and get a new key for your web map. Once you have a key, you can tell NPMap to use it by adding it to your NPMap.config object via the credentials property:


NPMap.config = [{
  api: 'bing',

  credentials: 'PutYourKeyHere',
  
  div: 'map'
}];

Disclaimer

If you are using NPMap, a link to the NPS disclaimer page will be automatically added to your map, so you don't need to manually add this.

If you are an NPS employee, partner, or contractor and you are not using the NPMap library to build your map, you must either:

  1. provide a link to the nps.gov maps disclaimer page when embedding a map built with the Bing Maps API in your web page; or
  2. display the following disclaimer on your web page:

References to non-U.S. Department of the Interior (DOI) products do not constitute an endorsement by the DOI. By viewing the Bing Maps API on this website, the user agrees to these Terms of Use set forth by Microsoft.

Here's the HTML markup for the disclaimer:

References to non-U.S. Department of the Interior (DOI) products do not constitute an endorsement by the DOI. By viewing the Bing Maps API on this website, the user agrees to these <a src="http://www.microsoft.com/maps/product/terms.html">Terms of Use</a> set forth by Microsoft.

Dependencies

The bing base API does not have any dependencies.

Base Layers

The following default base layers are available when utilizing the bing base API:

[{
  type: 'Aerial' // Bing Maps aerial tiles
},{
  type: 'Blank' // No tiles
},{
  type: 'Hybrid' // Bing Maps hybrid tiles
},{
  type: 'Streets' // Bing Maps streets tiles
},{
  type: 'Terrain' // Esri World Terrain Base
}]

These base layers can be added to your map via the NPMap.config.baseLayers config. You can also add other layer types (e.g. ArcGisServerRest, TileStream, etc.) as base layers to your map.

If the baseLayers config is not specified in the NPMap.config object, NPMap will default the base layer to type: 'Streets'.

Examples

Here's a link to a filtered list for the bing base API examples in our examples gallery: http://www.nps.gov/npmap/support/library/examples/?f=bing.