[OpenLayers-Users] Dynamic size of point using StyleMap
Arnd Wippermann
arnd.wippermann at web.de
Fri Apr 10 05:33:09 EDT 2009
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
-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Jacolin Yves
Gesendet: Freitag, 10. April 2009 09:59
An: Users at openlayers.org
Betreff: Re: [OpenLayers-Users] Dynamic size of point using StyleMap
Le Thursday 09 April 2009 18:03:32 Christopher Schmidt, vous avez écrit :
> On Thu, Apr 09, 2009 at 05:49:20PM +0200, Jacolin Yves wrote:
> > Hello,
> >
> > Is it possible to use zoomLevel variable in a symbolizer object in
> > StyleMap? :)
>
> You can use min and max scale.
>
> -- Chris
Hi Chris,
Thanks for your answer. May be I wasn't clear on what I want to do or I
don't understand your answer ;) . I wrote a Style object applied to my
vector layer.
I would like that the point radius change for each zoomLevel. i.e. the point
symbol become bigger when zoomLevel is bigger.
Y.
--
Yves Jacolin
Ne demandez pas si vous pouvez contribuer, contribuer ! :)
---
http://softlibre.gloobe.org
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
More information about the Users
mailing list