2

I want something similar to OpenLayers.Format.OSM for leaflet. i know how to use a geojson file and i have found support for GPX and WFS in plugins, but not for OSM.

Simply saying i want to make this map using leaflet and overpass.

2
  • .OSM XML is not supported in leaflet. You could use openlayers to convert to GeoJSON. But then you could use Openlayers for maps as well of course. – warrieka Sep 12 '13 at 12:03
  • Thanks @warrieka. I have already done it in openlayers and i want to do the same in leaflet. if you are sure, please post it as an answer. – neogeomat Sep 12 '13 at 13:06
2

Here's a Leaflet plugin that can render OSM XML: https://github.com/jfirebaugh/leaflet-osm It's used by the openstreetmap.org site to display a data layer for browsing and editing.

1

Not directly. Leaflet can read geojson so try converting osm to geojson using this Hope it works.

0

To load OSM data through Overpass API in Leaflet layer using this plugin:

http://labs.easyblog.it/maps/leaflet-layerjson/examples/overpass.html

1
  • This is good for smallish datasets and/or scenarios where you won't be querying a lot. But if you want to, say, show everything in a country, on a website that will be regularly visited, you might get your ip blocked. – Max von Hippel Oct 25 '16 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.