npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

leaflet-bing-layer

v3.3.1

Published

Bing Maps Layer for Leaflet v1.0.0

Downloads

19,395

Readme

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

| parameter | type | description | | ----------------------------- | -------------- | ----------------------------------------------------------------------------------------------------- | | options | string|object | A 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.bingMapsKey | string | A valid Bing Maps Key [required] | | [options.imagerySet] | string | optional: Imagery Type [default=Aerial]- Aerial - Aerial imagery- AerialWithLabels - Aerial imagery with a road overlay- AerialWithLabelsOnDemand - Aerial imagery with on-demand road overlay.- CanvasDark - A dark version of the road maps.- CanvasLight - A lighter version of the road maps which also has some of the details such as hill shading disabled.- CanvasGray - A grayscale version of the road maps.- Road - Roads without additional imagery. Uses the legacy static tile service.- RoadOnDemand - Roads without additional imagery. Uses the dynamic tile service.- OrdnanceSurvey - Ordnance Survey imagery. This imagery is visible only for the London area.Not supported: Birdseye and BirdseyeWithLabels | | [options.culture] | string | optional: Language for labels, see options [default=en_US] | | [options.style] | string | optional: Use a custom map style - only works with the AerialWithLabelsOnDemand and RoadOnDemand imagerySet options. |

Other options are passed through to a Leaflet TileLayer

Methods

| Method | Returns | Description | | ---------- | -------------- | ------------- | | getMetaData(<LatLng> latlng, <Number> zoom) | Promise | Get 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