BCoral
BCoral

Reputation: 33

Working with Markers and Polylines Google Maps android

I'm doing an app in Android that works with google maps, in which a user establishes routes and another user can add markers to indicate traffic jam , something like waze. The routes are polylines and the traffic jam are markers from a database.

My question: Is there a function or something that I can use to know when a route (polyline) is above a marker in the map ?. I hope I was clear, thank you.

Upvotes: 0

Views: 584

Answers (1)

pablobu
pablobu

Reputation: 1311

With the list of LatLng of the polyline and the position of your marker you can use PolyUtil.isLocationOnPath from https://github.com/googlemaps/android-maps-utils

Upvotes: 0

Related Questions