1

i have a marker and i want to move him on a LineString. So i know start LonLat and end LonLat and also the time between.

I tried to calculate it my self with "getLayerPxFromLonLat" and then count x+1 y+1 and after that i switch them back with "getLonLatFromPixel". So i can calculate it my self (e.g. 10 Seconds = 5 Points between start and end) but when i the map moves the function got wrong data.

I hope u have a idea for that Problem or an Idea how to get Points on a LineString.

0

The Answer was realy easy.

convert all Lonlat Data to SphericalMercator.

from SphericalMercator1 to SphericalMercator2 use the diff from x/y and divide by the steps you want. after that it is SphericalMercator1.lan +/- (diff/steps)

thats it!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.