Baidu map overlays are too many, loading is slow

 

Problem Description:

Baidu map has too many overlays, how to dynamically load overlays and only display overlays within the visualization area

If the server returns 4000 pieces of data, it is particularly slow when adding marker overlays. How to deal with this situation?

 

 

 

Adding 1000 overlays at one time, the speed is very slow and the picture is very stuck, how to solve it?

Can record 1000? If I don't load more than 300, the browser will be stuck and crashed. .

Because it needs to load a lot of overlays at one time, I simply experimented with 1000 (that is, for 1000 very simple overlays), which is very slow and very stuck. Is there any optimization method?
I see Baidu map loading 1000 is very fast, I don't know how to do it. . .

 

https://segmentfault.com/q/1010000000118057

I currently have about 1000 points of latitude and longitude coordinates that need to be rendered on the map,
but the efficiency is very slow, basically 500 points have to wait for more than ten seconds.
How to improve efficiency?

 

I have done arcgis before. If the efficiency of Baidu Map is very slow, you can consider controlling the points displayed at the same time according to the scale and the displayed map return.
For example, when you are in the whole map, there are 5000 points, but there is no concept on the map of China. Just a range. When the scale is less than a certain value, draw all the points within the map range.
Try to control the number displayed.

Also refer to Baidu's suggestions:

FAQ 7. When there are too many labels, the speed of the map will decrease in IE, especially IE6. How to solve?
Reply:
Please control the amount of labeled data within 150 to maintain high performance.
The number of callouts is within 260 and can be achieved using custom overlays.
If the number of annotations is greater than 300, it is recommended to try marker aggregation or data extraction.
Marker aggregation: http://tieba.baidu.com/f?kz=103109737...Data
extraction: For example, there are 10 markers, and 6 of them are selected as display points.
My suggestion is not to add too many markers on the map at one time, but to store the point in the database first, and then addOverlay when a marker needs to be displayed.

 

http://bbs.csdn.net/topics/391952641

 

http://tieba.baidu.com/p/1554267988

 

 http://bbs.csdn.net/topics/390718927

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326460419&siteId=291194637