我到目前爲止做了什麼: 我正在開發一個應用程序,我必須在Navteq地圖上顯示多於(50K)個點/標記,並將其劃分爲不同的部分。例如:如果我有50K點,我會將所有點分成不同的部分。如何在已被邏輯地劃分成段的地圖上顯示標記(巨大數字)?
如果我將50K
分爲50
分段,每個分段將有1000
分(可能不是50分段,可能取決於)。 現在它正在工作,但它需要很長時間,並且呈現MAP.so上的所有點,所以我想執行分段顯示以僅顯示聚類的幾個點。 ,以便我可以瞭解細分受衆羣的外觀。
但這裏的問題是我應該只執行基於片段的聚類。另外來自不同片段的點將被混合在一起並顯示爲單個單元,並向用戶傳達錯誤的信息。
所以這裏我的問題是:是否有可能執行基於段的聚類。這樣只有來自同一細分市場的點纔會聚集在一起。
注:如果這是不可能的,我想用最新版本here-maps 2.5.3
(異步)可能會降低一些時間,同時加載,這樣我想用索引功能也同時呈現點 改善渲染時間使用nokia.maps.clustering.Index
類。
我研究過索引會減少時間,同時在地圖上渲染點/標記。它對我的情況有幫助嗎?任何人都可以建議如何執行索引?
這是與我在地圖上顯示點代碼:
function displayAllLightPoints(arrLightPointCoordinats, totalLightPoints,
selectedSegmentId, totalSegmentsCount,segmentColorcode)
{
var MyTheme1 = function() {
};
segmentColorcode = segmentColorcode.substring(2,segmentColorcode.length-1);
MyTheme1.prototype.getNoisePresentation = function (dataPoint) {
var markerLightPoint = new nokia.maps.map.Marker(dataPoint, {
icon: new nokia.maps.gfx.BitmapImage("..//Images//Lightpoint//" +
segmentColorcode + ".png"),
anchor: {
x: 12,
y: 12
}
});
return markerLightPoint;
};
MyTheme1.prototype.getClusterPresentation = function (data) {
var markerLightPoint = new
nokia.maps.map.StandardMarker(data.getBounds().getCenter(), {
icon: new nokia.maps.gfx.BitmapImage("..//Images//
Segment/" + segmentColorcode + ".png", null, 66, 65),
text: data.getSize(),
zIndex: 2,
anchor: {
x: 12,
y: 12
}
});
return markerLightPoint;
};
var ClusterProvider = nokia.maps.clustering.ClusterProvider,
theme = new MyTheme1(),
clusterProvider = new ClusterProvider(map, {
eps: 0.00000000001,
minPts: 1000000,
strategy: nokia.maps.clustering.ClusterProvider.
STRATEGY_DENSITY_BASED,
theme: theme,
dataPoints: []
});
var lightpointsDataSet1 = new Array();
for (var i = 0; i < totalLightPoints; i++) {
lightpointsDataSet1[i] = { latitude: arrLightPointCoordinats[i][0],
longitude: arrLightPointCoordinats[i][1], title:
'LightPoint ' + (i + 1) };
}
clusterProvider.addAll(lightpointsDataSet1);
clusterProvider.cluster();
}