Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-bing-layer

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-bing-layer

Bing Maps Layer for Leaflet v1.0.0

  • 3.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4K
decreased by-46.18%
Maintainers
1
Weekly downloads
 
Created
Source

leaflet-bing-layer

Bing Maps Layer for Leaflet v1.0.0

L.TileLayer.Bing(options|BingMapsKey)

Create a new Bing Maps Layer. Depends on Promises which needs a polyfill for older browsers by adding this script to your html <head>:

<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>

Parameters

parametertypedescription
optionsstring|objectA valid Bing Maps Key or an options object. options inherits from L.TileLayer options (e.g. you can use minZoom and opacity and etc)
options.bingMapsKeystringA valid Bing Maps Key [required]
[options.imagerySet]stringoptional: Imagery Type [default=Aerial]
- Aerial - Aerial imagery
- AerialWithLabels - Aerial imagery with a road overlay
- Road - Roads without additional imagery
Not supported: Birdseye and BirdseyeWithLabels
[options.culture]stringoptional: Language for labels, see options [default=en_US]

Methods

MethodReturnsDescription
getMetaData(<LatLng> latlng, <Number> zoom)PromiseGet the Bing Imagery metadata for a specific LatLng and zoom level. latLng or zoom are optional if the layer is attached to a map, they default to current map center and zoom. Returns a Promise that resolves to the metadata JSON from Bing

Example

var map = L.map('map').setView([51.505, -0.09], 13)
L.tileLayer.bing(MyBingMapsKey).addTo(map)

Live Example see index.html

License

MIT

Keywords

FAQs

Package last updated on 08 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc