tags:

views:

5

answers:

0

I am using the 'onmouseover' event on my map.

// Render the map
function InitializeMap() {
    map = new VEMap('myMap');
    .
    .
    .
    map.AttachEvent("onmouseover", ShowPopup);
}

If I hover over an object, I can recover the VEShape object. by using the 'GetShapeByID' method.

// Event on mouseover
function ShowPopup(e) {
    if (e.elementID == null)
        return;

    var shape = map.GetShapeByID(e.elementID);

    // add popup to shape
}

In some cases this shape belongs to a cluster and the popup needs to be different from the popup for a shape, and needs to be aware of certain properties of the cluster such as how many shapes are clustered. How can I differentiate between a regular shape and a shape that represents a cluster? How can I get the cluster?

Any help is appreciated. Thank you.

related questions