GithubHelp home page GithubHelp logo

agorf / leaflet-bing-layer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digidem/leaflet-bing-layer

0.0 2.0 0.0 42 KB

Bing Maps Layer for Leaflet v1.0.0

Home Page: http://digidem.github.io/leaflet-bing-layer/

HTML 4.42% JavaScript 95.58%

leaflet-bing-layer's Introduction

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
- Road - Roads without additional imagery
Not supported: Birdseye and BirdseyeWithLabels
[options.culture] string optional: Language for labels, see options [default=en_US]

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.