How to create a path root like google maps

This is a starting point you might be able to use for finding the shortest path between two points https://www.babylonjs-playground.com/#7YCXAI#2

From Best way to "Measure" a Surface of a model between a set of points