Ich kann die Karte mit ManuovePoints zeichnen.Bing Maps Richtungen mit Clustering
Unten ist der Screenshot für Karte
Unterhalb der Code für das Routing ist.
var maneuverPoints = this.model.get("maneuverPoints");
if (maneuverPoints) {
var routePoints = [];
_.each(maneuverPoints, function (point) {
routePoints.push(new MsMaps.Location(point.latitude, point.longitude));
});
var routeOptions = {
strokeColor: new MsMaps.Color(1, 65, 255, 35),
strokeThickness: 3
};
var routeShape = new MsMaps.Polyline(routePoints, routeOptions);
map.entities.push(routeShape);
}
Jetzt versuche ich, Clustering zu implementieren, und ich bin in der Lage es wie unten zu tun:
Die rosa Stecknadeln die Cluster sind.
-Code für das Clustering ist wie folgt:
Microsoft.Maps.loadModule ("Microsoft.Maps.Clustering", function() {
var clusterLayer = new Microsoft.Maps.ClusterLayer(pushpins);
map.layers.insert(clusterLayer);
clusterLayer.setPushpins(pushpins);
map.setView(viewOptions);
var maneuverPoints = this.model.get("maneuverPoints");
if (maneuverPoints) {
var routePoints = [];
_.each(maneuverPoints, function (point) {
routePoints.push(new MsMaps.Location(point.latitude, point.longitude));
});
var routeOptions = {
strokeColor: new MsMaps.Color(1, 65, 255, 35),
strokeThickness: 3
};
var routeShape = new MsMaps.Polyline(routePoints, routeOptions);
map.entities.push(routeShape);
}
ich nicht in der Lage bin Clustering und Routing zu tun bei Gleichzeitig ist es möglich, beides gleichzeitig zu tun?