Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Maps geometry library in Node.js

I'm having a lot of trouble integrating the Google Maps API into Node.js. I'm currently using the node-googlemaps library.

However, I can't seem to be able to use the Google Maps geometry library specifically within this API.

So far I've gotten the directions API working. I would like to construct a polyline from the result of directions response, and then see if the polyline contains coordinates.

I guess the geometry API isn't 100% necessary, but it's something that I know would work if I could just get it working through Node.

Thank you!

like image 736
leonlxli Avatar asked May 15 '16 01:05

leonlxli


1 Answers

The spherical-geometry-js library ports the Google Maps geometry API, so you could use it alongside node-googlemaps in your code. (Disclaimer: I'm the author of spherical-geometry-js.)

like image 168
NotWoods Avatar answered Nov 18 '22 21:11

NotWoods