tillnagel / unfolding

A library to create interactive maps and geovisualizations in Processing and Java
http://unfoldingmaps.org
Other
478 stars 246 forks source link

Why so little doc explanation for the unfolding.geo package? #124

Closed Guangtong closed 8 years ago

Guangtong commented 8 years ago

By the way, is there API that can transform km distance to pixels on the map? Thank you.

tillnagel commented 8 years ago

Yes, it's a bit under documented. However, that package mostly is for internal use. Do you have something special in mind?

Maybe you are more looking for the GeoUtils class in the utils package? There you'll also find helper methods to convert km to pixels and vice versa. Specifically, check out GeoUtils.getDestinationLocation(originLocation, bearing, distanceInKm) for your question.

tillnagel commented 8 years ago

For a full example to use that method for calculating km to pixels, see https://github.com/tillnagel/unfolding/blob/master/examples/de/fhpotsdam/unfolding/examples/geo/GetDistanceApp.java

Guangtong commented 8 years ago

You are so talented and willing to help! Thank you.