how to add paths to indoor mapping in leaflet?

1.5k Views Asked by At

I am working on indoor mapping using leaflet. I have indoor floor plan with me and I stitched that to leaflet maps.

How to add pathways to indoor mapping for navigation purpose?

1

There are 1 best solutions below

3
On

You should be able to use Leaflet's Polyline class to draw a pathway on your map. Here's an example from the documentation:

// create a red polyline from an array of LatLng points
var latlngs = [
    [45.51, -122.68],
    [37.77, -122.43],
    [34.04, -118.2]
];
var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map);
// zoom the map to the polyline
map.fitBounds(polyline.getBounds());