Are there any example using the shape components (Rectangle, Polygons)? Ive looked through the docs and didnt find any docs explaining what is need to use it properly.
onRightClick={_.noop}
onDragStart={_.noop}
/>
This is what is see on the main page but doesnt really explain how to specify where the lat/long goes and how to use it.
I think its something like this
import { Polygon } from 'react-google-maps';
<Polygon
paths={[points]}
options={{
fillColor: `red`,
fillOpacity: 0.20,
strokeColor: `red`,
strokeOpacity: 1,
strokeWeight: 1,
}}
/>
How do you detect if a marker point is inside the polygon? For example, https://developers.google.com/maps/documentation/javascript/examples/poly-containsLocation
It doesn't look like this library has that method. could also use something like https://github.com/manuelbieh/Geolib isPointInside - depends on what you need it for
The goal is to have the user be able to click or view if a new set of lat/lng are in the current polygon area. Similar to the example for google if you clicked inside the bermudaTriangle you would see a blue triangle and outside a red circle.
Please refer to Getting Help section in the README.
Hi @whosGuys, did you finally find out how to do this ? I have the same issue. Nothing about that in the Getting Help section by the way. Something like containsLocation() would be amazing !
@glevha No unfortunately after reviewing the licensing of this library, we had to switch to something else so i never did figure out this issue.
Most helpful comment
I think its something like this