How to show the directions on a polyline

waterwalker
03-19-2008, 03:02 AM
Hi,

I have to show a driving route of a vehicle based on latitude and longitude.
There are about 8000 Points to show in the map. ( it's only one day to show )

I use getlocation with lon and lat to get the direction-array and then addpolyline to show the line.
Thats not the Problem, but I have to show the driving-direction at some points ( e.g. in a distance of 300 m ).
I tried to use add line with line.endArrowhead, but this is very very slow. it is about 3 minutes of time to schow the route.

Is there any fast solution to show the directions? It can be shown at every point too. ( if there is any property to set at the directions )

Thanks in advance

Regards,

Christian

Winwaed
03-19-2008, 08:50 AM
I think you probably need to rethink what you are doing - 8000 locations is a lot!

Adding them all with an array is the right thing btw.

Richard

waterwalker
03-19-2008, 03:43 PM
Hello Richard,

as I said: The drawing of the Polyline is not the problem. The problem is, the to show the direction at the locations.

Christian.

Winwaed
03-19-2008, 05:08 PM
As I said, I think your polyline has too many points - that is why it is taking so long to add the arrows!

Richard

Wilfried
03-20-2008, 01:53 AM
Hi,

You don't need 8000 positions on the map. Just draw what is in the visible area of the map. Also if user is strong zoomed out then more and more positions become visible, but even then you don't have to draw them all because it would not be recognizable.

Of course you have to recalculate what to draw after every zoom / pan of the user. but there are the events for.

 
Web mp2kmag.com
mapforums.com