中國(guó)建設(shè)網(wǎng)站企業(yè)網(wǎng)上銀行業(yè)務(wù)功能南京百度seo代理
在飛機(jī)、輪船等地圖顯示的應(yīng)用中,很多時(shí)候會(huì)用到數(shù)據(jù)聚合,Openlayers中提供了Cluster這個(gè)API
,他作為souce的一部分,設(shè)定distance值,如果2個(gè)點(diǎn)的間距小于 distance 所設(shè)置的數(shù)時(shí),就會(huì)以聚合的方式顯示。從而解決了數(shù)據(jù)淤積顯示的狀態(tài),非常實(shí)用。
效果圖
源代碼
/*
* @Author: 大劍師蘭特(xiaozhuanlan),還是大劍師蘭特(CSDN)
* @此源代碼版權(quán)歸大劍師蘭特所有,可供學(xué)習(xí)或商業(yè)項(xiàng)目中借鑒,未經(jīng)授權(quán),不得重復(fù)地發(fā)表到博客、論壇,問(wèn)答,git等公共空間或網(wǎng)站中。
* @Email: 2909222303@qq.com
* @First published in CSDN
* @First published time: 2023-08-10
*/<template><div class=