[OpenLayers-Users] GML,
Point and Change the Size of the Circle...
Andreas Hocevar
ahocevar at opengeo.org
Fri Aug 29 03:59:09 EDT 2008
Kit Plummer wrote:
> Ok, first let me plead practical ignorance here. I've only been
> working with OpenLayers for about a week. And, I'm integrating it
> into ExtJS. I have a known GML file that contains Points. I'd like
> to be able to add an attribute to each element that would specify the
> size of the circle that gets drawn by OL. Am I out of luck here? If
> not, would somebody be so nice as to point me in the right direction?
Have a look at http://www.openlayers.org/dev/examples/styles-rotation.html.
You will want to use a style map, and define the pointRadius property of
the symbolizer. Say you have a field called "size" in your GML features.
Then your stylemap constructor call could look like that:
new OpenLayers.StyleMap({
"default": OpenLayers.Util.applyDefaults({
pointRadius: "${size}"
}, OpenLayers.Feature.Vector.style["default"]
});
Regards,
Andreas.
More information about the Users
mailing list