Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hellocaio opened this issue Mar 11, 2021 · 2 comments
Open

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

hellocaio opened this issue Mar 11, 2021 · 2 comments

Comments

@hellocaio
Copy link

hellocaio commented Mar 11, 2021

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
Copy link
Author

hellocaio commented Mar 11, 2021

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
Copy link
Author

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

@hellocaio hellocaio reopened this Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant