Google Maps API drawing polygon with JSTS Librery

black toy car on world map paper
Photo by Mihis Alex on Pexels.com

One of our clients has asked for a road map feature for their website. basically what he needs is A Road map that lists all places around the route.

Now getting distance between two points was very easy the important thing is how to draw a polygon around the route.

After a lot of browsing and googling, I found an amazing library that is able to draw a polygon around the route it’s called the JSTS library.

please check this Example, you will be able to figure out the Road Trip feature 😉

geocodezip is website which has google maps API libraries  you will be amazed what we can do with them please do check.