Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinates in directions request isn`t same with response coordinates ... #7167

Closed
tahrz opened this issue Aug 22, 2018 · 1 comment
Closed

Comments

@tahrz
Copy link

tahrz commented Aug 22, 2018

mapbox-gl-js version: 0.47

browser: Chrome Version 68.0.3440.106 (Official Build) (64-bit)

Steps to Trigger Behavior

  1. Request URL
https://api.mapbox.com/directions/v5/mapbox/walking/46.447820799999995,30.739660800000003;46.4778208,30.7396608?geometries=geojson&access_token={MyToken}

Expected Behavior

Coordinates from request must be in response...

Actual Behavior

I get not my coordinates in response... so that`s why route draw in enother country...

Coordinates, which i send:

start = [46.447820799999995,30.739660800000003],
end = [46.4778208,30.7396608]

Coordinates in response

start = [46.447172,30.73663],
end = 46.476164,30.732026]
@jfirebaugh
Copy link
Contributor

This isn't an issue with mapbox-gl-js, but I'll answer anyway: this is expected behavior, because the directions API snaps input coordinates to the nearest relevant road segment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants