Topic: Is there a way to detect the road when the user clicks on the map?

Hi.
Is there a way to detect the road when the user clicks on the map?

Re: Is there a way to detect the road when the user clicks on the map?

Hi.

The easiest way to do this is the Google Road API:
https://infinity-code.com/doxygen/onlin … c031850cd1

Alternatively, you can use Vector Tiles or OSM Overpass API to check the road. But these ways are much harder to implement.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Is there a way to detect the road when the user clicks on the map?

So with this "SnapToRoads" feature, can I detect if the user places a marker on the road?

Re: Is there a way to detect the road when the user clicks on the map?

Snap To Road will give you the nearest point on the road (if possible).
Calculate the distance from the click point to the point on the road, and if this is less than some threshold, the user has clicked on the road.
https://infinity-code.com/doxygen/onlin … dd617a6d18

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.