I develope a vehicle tracking application in MapSuite 10 Winforms. I want to use clustering. When 5 cars are close to one another, I want an icon to appear with the number 5 (6,7,8…). When I use the command clusterPointStyle.MinimumFeaturesPerCellToCluster = 5 the vehicles that are in number lower than 5 dissapears (the points of the vehicles). And if I use clusterPointStyle.MinimumFeaturesPerCellToCluster = 1 then the clustering applies to every vehicle. I want clustering for 5 vehicles and above, and when the clustering won’t be applied I want the vehicles to have specific icons that I apply taking into consideration the speed and the direction.
Clustering for tracking vehicles
Hi Marios,
As below is the description about the property of cluster point style:
CellSize: The properties indicates how the screen will be divided.
MinimumFeaturesPerCellToCluster: The number of features in a cell to suppress drawing the style, the features won’t display as a clustered if the count less than the value.
And you can set other property follow your requirement, please refer our sample here: https://github.com/ThinkGeo/ClusterPointSample-ForWinForms
And here we have another sample about vehicle tracking, you can also view it:
Regards,
Ethan
I have already downloaded and checked these samples. I want when the vehicles are far from others to appear with icons that I have assigned and not the circles with the numbers. I want the clustering and clustering’s icons to be applied for 5 vehicles and above.
Hi Marios,
Our ClusterPointStyle is based on the distance, but don’t related with the cluster number.
That means, if you assign the style to map, it always cluster the features which met the condition. So you cannot make it only cluster the features more than 5.
Here is the sample I modified, which can shows image for different number, you can modify the value to get different result.
ClusterPoint.zip (223.7 KB)
And if you want to make the style work follow your description, you should want to write a custom style, or you can inherit our style class to implement that.
Regards,
Ethan