So, if I understand correctly, you have similar information in the same place, is that right?
To display both information, you will have two options:
- Combine the information in a text box using the appropriate way to present the information inside this ui element (for example, using your own tabbed tab)
- Mark a point manually when you are at a certain zoom level.
There is no default property to set this, and it would be useless to do this on many supports, but in the main idea you would need to: detect the changechangeend event, if you are at a certain zoom level (or a higher zoom level), then you have them decompress (I call it decluter next to the buttons).
// Bind pushpin mouseover. Microsoft.Maps.Events.addHandler(pin, 'mouseover', function (e) { var currentPin = e.target; currentPin.setOptions({ visible: false }); var currentLocation = currentPin.getLocation().clone(); var currentPoint = bmGlobals.geo.map.tryLocationToPixel(currentLocation); if (currentPin.associatedCluster.length == 2) { // Display the first pushpin var pinA = createPin(currentPin.associatedCluster[0]); var locA = bmGlobals.geo.map.tryPixelToLocation(new Microsoft.Maps.Point(currentPoint.x - pinA.getWidth(), currentPoint.y)); pinA.setLocation(locA); bmGlobals.geo.layerClusteredPin.push(pinA); // Display the second pushpin var pinB = createPin(currentPin.associatedCluster[1]); var locB = bmGlobals.geo.map.tryPixelToLocation(new Microsoft.Maps.Point(currentPoint.x + pinB.getWidth(), currentPoint.y)); pinB.setLocation(locB); bmGlobals.geo.layerClusteredPin.push(pinB); } });
I will try to write a bing card module about this, but in this case you will have to get your cluster buttons (or your own button that has two connected data objects), and then you will need to set your position based on client-side rendering.
source share