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

Distance and Buffer #264

Closed
lurajon opened this issue Jun 23, 2015 · 3 comments
Closed

Distance and Buffer #264

lurajon opened this issue Jun 23, 2015 · 3 comments

Comments

@lurajon
Copy link

lurajon commented Jun 23, 2015

Hi!
Thank you for a great JavaScript library!

I have an issue where the buffer or distance does not align correctly, and I am unsure if it is the turf library or the leaflet geodesic library that causes the problem.

I want to create functionality to draw a "circle" around a point with a given distance, and also draw the distance line.

I have created two points. I buffer the main point with the distance returned by the turf.distance(p1, p2).

The problem is that the distance line and the buffer geometry only connects on the southern and northern points of the "circle" as you can see in this jsfiddle: http://jsfiddle.net/lurajon/u5Ler6na/

Best regards,

Jone
screen shot 2015-06-23 at 12 40 00
screen shot 2015-06-23 at 12 40 13

@ChouGary
Copy link

ChouGary commented Jul 2, 2015

data is WGS84
but map is Mercator projection ,so the Square is rectangle !
image
https://upload.wikimedia.org/wikipedia/commons/a/a5/Mercator_projection_Square_lo-res.JPG

@morganherlocker
Copy link
Member

This issue is a duplicate of the turf-buffer issue. Basically, this is a known issue that is being worked on. The linked ticket has a temporary drop in copy-paste work around. PRs for geodesic polygon buffering are also welcome, as that is the blocker being worked through at the moment.

@lurajon
Copy link
Author

lurajon commented Jul 7, 2015

Thank you Morgan!

I will look into it.

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

3 participants