leaflet-map

simple way to make a leaflet map application

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
leaflet-map
000.2.19 years ago9 years agoMinified + gzip package size for leaflet-map in KB

Readme

leaflet-map
simple way to make a leaflet map application

usage

var L = require('leaflet')
var leafletMap = require('leaflet-map')

var map = leafletMap()
L.tileLayer('https://{s}.tiles.mapbox.com/v3/examples.map-i86knfo3/{z}/{x}/{y}.png')
  .addTo(map)

L.marker([0,0])
  .bindPopup('Null Island!')
  .addTo(map)

Use with browserify for best results!

run the example

from the project root,
$ npm run example

api

leafletMap(opt?: Object) => LeafletMap

creates a DOM Element and initializes a Leaflet map in it.
opt is an object with any of the following properties:
  • defaultStyle boolean (default: true). Whether to include CSS and set basic page styling to render a full-page map.

installation

$ npm install leaflet-map

running the tests

From package root:
$ npm install
$ npm test

contributors

  • jden

license

ISC. (c) MMXIV jden . See LICENSE.md