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?
You are not logged in. Please login or register.
Infinity Code Forum → Online Maps Help → 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?
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.
So with this "SnapToRoads" feature, can I detect if the user places a marker on the road?
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
Infinity Code Forum → Online Maps Help → Is there a way to detect the road when the user clicks on the map?
Powered by PunBB, supported by Informer Technologies, Inc.