I did that for
http://crschmidt.net/flickr/geo/tokyo
StyleMap used context to get the information for pointRadius;
styleMap: new OpenLayers.StyleMap({'default': new OpenLayers.Style({
fillColor: 'red','pointRadius':'${radius}', 'externalGraphic': '${g}' },
{
context: {
g: function(feature) {
if (!feature.cluster) {
return feature.attributes.image;
} else {
return "";
}
},
radius: function(feature) {
return feature.cluster ?
Math.min((Math.max(feature.cluster.length, 7) +
5)/2, 15) :
15;
}
}
}),
'select': {fillColor: 'blue', pointRadius: 20}
})
and then clicking used the feature.cluster property to get the photos to display
on the right hand side.
On Jul 19, 2011, at 11:15 AM, ext Robert Buckley wrote:
>
> http://www.os2020.org.nz/project-map/
>
> Hi,
>
> I would love to know how I could use the cluster strategy and display a point
> with the size based on number of features, and also get a list of features
> in a popup to zoom to!
>
> Anyone know....unfortunately the code doesn´t tell me much.
>
> yours,
>
> Rob
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users