Skip to content
OpenStreetMap plugin for Leaflet
Find file
Latest commit be0dcb7 @jfirebaugh Merge pull request #11 from jocelynj/
Change url for HOT layer and enable https

leaflet-osm is a Leaflet plugin for rendering tile and vector data from

For example, the website could use it to highlight a particular way or node on the base map.

Usage Examples

Tile Layers

new L.OSM.Mapnik().addTo(map);
// or L.OSM.CycleMap, L.OSM.TransportMap, or L.OSM.MapQuestOpen

Data Layer

  url: "",
  // or ""
  dataType: "xml",
  success: function (xml) {
    var layer = new L.OSM.DataLayer(xml).addTo(map);


leaflet-osm is tested with node.js using mocha and chai:

$ npm install -g mocha
$ npm install
$ mocha


Copyright 2012 John Firebaugh

BSD License (see the BSD-LICENSE file)

Portions derived from OpenLayers. See BSD-LICENSE for details.

Something went wrong with that request. Please try again.