0

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?

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

0

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());
JRI
  • 1,766
  • 13
  • 25
  • thanks this is cool. but how can i use it for indoor navigation (way finding ) – Akshay Kulkarni Feb 02 '18 at 05:20
  • You've asked about how to draw a pathway. If you need more information about different ways of doing this, you need to post more detail in your question. What sort of map are you using? Do you just need to show one path, or a choice of several? What format is your data? See [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) – JRI Feb 03 '18 at 07:57
  • If your problem is actually about how to work out where the path should go, it might be worth asking a separate question about indoor routing, perhaps on https://gis.stackexchange.com/ – JRI Feb 03 '18 at 07:58