[OutSystems Maps] A Point in a given polygon-In offline mode
outsystems-maps
Reactive icon
Forge component by Platform Maintenance
Application Type
Mobile

Hi all,

I am using Outsystems maps. I have some Coordinates in Polygon maps. If the marker are inside the area (set of coordinates i've mentioned before), I want to create an output with boolean variable for stating that the current long lat are within the area or not.

I found one javascript . But Output value didn't get my side. So, Anyone can assist me for using this javascript in Outsystems maps Forge.

Thanks,

Sathish R

Solution

Hi @Sathish Kumar R 

You should be able to achieve that by using the following script (please replace the shape, markers and the map with the one you want, this is only an example):

google.maps.geometry.poly.containsLocation(
MapAPI.MapManager.GetActiveMap().markers[0].provider.internalPosition,
MapAPI.MapManager.GetActiveMap().shapes[0].provider
)

Here's an example:

Cheers,
GM




Hi @Sathish Kumar R 

Find attached a sample with a possible solution for this requirement.
Keep exploring the APIs by yourself since this is the magic of the architecture we put in place that allow our community to extend by far our out of the box offer

Cheers,
GM

Sample_CheckMarkersPolygon.oml


Hi Gonçalo Martins

Thanks a lot for your help :-) 


Best Regards,

Sathish R

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.