Skip to content Skip to sidebar Skip to footer

Google Maps Roads Api Returns Duplicate Coordinates And Placeids

I'm implementing google maps roads API to pick up the coordinates where I clicked on the roads. But it returns more than expected coordinates and placeids. Suppose I set a directio

Solution 1:

You are calling the Roads API with interpolate: true. According to the documentation, that causes it to behave the way you say it is.

from the documentation:

  • interpolate — Whether to interpolate a path to include all points forming the full road-geometry. When true, additional interpolated points will also be returned, resulting in a path that smoothly follows the geometry of the road, even around corners and through tunnels. Interpolated paths will most likely contain more points than the original path. Defaults to false.

Post a Comment for "Google Maps Roads Api Returns Duplicate Coordinates And Placeids"