node-googlemaps icon indicating copy to clipboard operation
node-googlemaps copied to clipboard

Is it possible to use Google Maps Geometry in Node JS?

Open hellocaio opened this issue 4 years ago • 2 comments

I'm trying to get access to Google Maps Geometry to calculate points with a specific area in Node JS.

    ...
    const circle = new google.maps.Circle({
        center: area.center,
        radius: area.radius,
    });
    const doesContain = circle.getBounds().contains(location);

Circles, rectangles, polygons... does anyone know how?

hellocaio avatar Mar 11 '21 01:03 hellocaio

It looks like I found a solution:

Spherical Geometry Library https://www.npmjs.com/package/spherical-geometry-js

I'll give it a shot; but if anyone has other suggestion please let me know.

hellocaio avatar Mar 11 '21 02:03 hellocaio

The library I mentioned doesn't solve the issue, it doesn't support circles or polygons -- only rectangles.

hellocaio avatar Mar 11 '21 02:03 hellocaio