How can I use a JS or plugin on a website, to calculate shortest path between 2 points along a road network?

I made the road network in QGIS, then exported with qgis2web plugin for my website.

I'm not sure but seems like google doesn't go over some lawns and the path will end at the road only.

While making my own network of roads in QGIS and using the road graph I can have what I want. But if I export it using qgis2web, the road graph plugin is left behind. And google APIs only give me the one in the image.

as you can see.. the left picture only ends at the road using qgis. so i made my own paths in qgis but i cant use it in my web.

As you can see, the left picture only ends at the road using QGIS. So I made my own paths in QGIS but I can't use it in my website.

  • You can not use that with qgis2webl, because qgis2web provides only a web layers from your dat in GeoJSON. If you want to do this dynamically you will have to use other libraries – Ahsan Mukhtar Jul 7 '18 at 8:00
  • You will need to have a database with Algorithm Implemented. – Ahsan Mukhtar Jul 7 '18 at 8:00
  • gosh. ok sir thanks, can you give me something to start off. like what should i be reading now. ive been focusing mostly on leaflets and apis now. and im not that good at it too. if anything i would really need something i could start off. perhaps you could kindly give me somethings to read first. thanks for your answer. i really really appreciate it – AbdulMalik Mustapha Jul 7 '18 at 11:18
  • I would suggest you to follow workshops.boundlessgeo.com/tutorial-routing – Ahsan Mukhtar Jul 8 '18 at 6:24
  • i wont be deleting my question for i am sure one day someone will have this problem too. you can follow Mr. Ahsan Mukhtar's advice. best of lucks – AbdulMalik Mustapha Jul 9 '18 at 4:02

Your Answer

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

Browse other questions tagged or ask your own question.