How to make route drawing more efficient?

后端 未结 3 778
夕颜
夕颜 2021-01-01 05:50

This is the code I\'m using to draw route. When i have 1000 of points, route severely slows ui. Maybe someone could provide a code snippet or a link which explains how to do

3条回答
  •  长发绾君心
    2021-01-01 05:54

    Best way to increase speed of drawing is reducing number of point the path includes. Probably they are not necessary - lot of them just lays between previous and next, so you can filter them by:

    minimal distance from previous point (easy way)

    minimal bearing change (a bit harder, although Location class and it's method bearingTo() should help.

提交回复
热议问题