gis - How can I directly display a simple .OSM file in browser? -
how can directly display simple .osm file in browser. want display .osm file in browser displayed in josm editor.
the leaflet plugin leaflet-osm has option load data layer uses single osm object, or small number of objects. method not recommended large amount of data.
here's example leaflet page:
$.ajax({ url: "http://www.openstreetmap.org/api/0.6/node/164979149", // or "http://www.openstreetmap.org/api/0.6/way/52477381/full" datatype: "xml", success: function (xml) { var layer = new l.osm.datalayer(xml).addto(map); map.fitbounds(layer.getbounds()); } });
Comments
Post a Comment