Google maps contain location on android

I am writing an application that should determine if a user falls into one of several specific zones (based on gps location).

The javascript google maps API has an easy-to-use containsLocation () function. However, I want to be able to do this from an Android application, and not from a web service. Does anyone know if such a call exists in the version of Android maps? Any pointers would be helpful!

+5
source share
2 answers

A little late, but here is the answer: com.google.maps.android.PolyUtil.containsLocation () from the Google Maps utility Android API library.

+5
source

You can use the Geofencing function for this purpose. The API for this is part of the Google Play Services library, and therefore, you can start using it by importing it into your application project.

It even gives a notification if a particular user has entered or left a specific geodetic location, so that the developer can track the number of mobile devices entered into the specified zone. The implementation is quite simple, I am inserting some links that may help you in the future.

This is the official Google documentation on Geofencing: http://developer.android.com/training/location/geofencing.html

This link actually implements a geoprocessing application.

And this is another link if you want to use a third-party plugin in order to get a geo object in your application.

Hope this helps !!!

0
source

Source: https://habr.com/ru/post/1209499/


All Articles