Problem with large number of markers on the map

前端 未结 3 2002
一个人的身影
一个人的身影 2020-12-24 00:09

I am working on an Android app that already exists on iPhone.

In the app, there is a Map activity that has (I counted) around 800 markers in four groups marked by dr

相关标签:
3条回答
  • 2020-12-24 00:19

    There are two ways you can do this route simplification.

    1) If you got the heading of all the points. You can keep a heading tolerance , say if the heading diffference between point A and B is 0.5 Just draw a line from A to B and ignore the points between.

    2) If you dont have a heading. Make a triangle as shown in the fig. If h lies in between your limits, skip the points in between and draw a line from A to B enter image description here

    You can also use some other route simplification algorithms.


    See also :

    Route simplification - Douglas Puecker Algorithm

    0 讨论(0)
  • 2020-12-24 00:31

    I am having same problem in multiple marker loading on map but I have put some delay in loading marker and display map.first display map and after some delay will load all marker. that will load faster up to some extent.

    0 讨论(0)
  • 2020-12-24 00:34

    Well. It turned out I call populate() every time after adding an marker. I took populate() out of addOverlay() method and I am calling it after loop finishes. All markers now show almost instantaneously. The only problem now is that the map is very unresponsive when at lower zoom (showing a lot of markers at once). I don't see solution for this unless I figure out how to decrease number of markers on the map when map is zoomed out... thinking to group them somehow.... currently working on this...

    0 讨论(0)
提交回复
热议问题