[OpenLayers-Users] Dynamic size of point using StyleMap
Jacolin Yves
yjacolin at free.fr
Fri Apr 10 08:07:27 EDT 2009
Le Friday 10 April 2009 11:33:09 Arnd Wippermann, vous avez écrit :
> Hi Yves,
>
> Perhaps that's what you search:
>
> http://openlayers.org/pipermail/users/2008-September/007482.html
>
> var style = new OpenLayers.Style(OpenLayers.Util.applyDefaults({
> pointRadius: "${scaledSize}"
> }, OpenLayers.Feature.Vector.style["default"]), {
> context: {
> scaledSize: function(feature) {
> return feature.layer.map.getResolution() *
> feature.attributes.size;
> }
> }
> });
> var styleMap = new OpenLayers.StyleMap({"default": style});
>
> Arnd
Thanks Laurent and Arnd. I think it is what I need.
Best regards,
Y.
--
Yves Jacolin
Ne demandez pas si vous pouvez contribuer, contribuer ! :)
---
http://softlibre.gloobe.org
More information about the Users
mailing list