[OpenLayers-Users] Re: Styling point features by attribute values

Vishal Mehta vishalm1975 at gmail.com
Thu Jun 16 19:41:18 EDT 2011


hmmm...but i gathered from Chapter 9 of the OpenLayers book, on StyleMaps
and Styles, that its possible to assign styles to attributes in a manner
similar to what i tried? At the same time the response i'm getting is
consistent with your reply.
-Vishal

On Thu, Jun 16, 2011 at 12:54 PM, Rossko <rossko at culzean.clara.co.uk> wrote:

> >
>
> map.layers[1].styleMap.styles.default.defaultStyle.pointRadius='${Water_Leve}';
> ...
> > I think that the attribute may have been registered as a string
>
> What attribute?  To javascript '${Water_Leve}' is a string, pure and
> simple,
> with a $ character, a { character, a W character, etc etc.
>
> >  ... =parseFloat('${Water_Leve}');
>
> It's still just a string, so parseFloat of a non-numeric string give result
> NaN (Not a Number), just as it should.
>
>
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/Styling-point-features-by-attribute-values-tp6483796p6484513.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



-- 
Vishal K. Mehta, PhD
Scientist
Stockholm Environment Institute - US
133 D St Suite F
Davis CA 95616
www.sei-us.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110616/d0a42603/attachment.html


More information about the Users mailing list