luiscvalmeida
luiscvalmeida

Reputation: 152

Detect if google map marker is placed on route

Is it possible to detect if a marker is placed in the middle of a route I made using Google Maps API V3?

Upvotes: 0

Views: 484

Answers (1)

Dr.Molle
Dr.Molle

Reputation: 117354

Take a look at the isLocationOnEdge-method of google.maps.geometry.poly

Note: the geometry-library isn't loaded by default, you must load the library by adding the libraries-parameter to the maps-API-script-url: &libraries=geometry

Upvotes: 2

Related Questions