[OpenLayers-Users] can't style a feature .... please help

Robert Sanson Robert.Sanson at asurequality.com
Wed Jun 29 17:47:30 EDT 2011


Try something like:
 
var style1 = new OpenLayers.style({strokeWidth:5, 'strokeColor':
'#ff0000'});
polygon1 = new OpenLayers.Feature.Vector(lines, style:style1);

regards,
 
Robert

>>> JK Chen <jk.chen at sdl.usu.edu> 30/06/2011 9:27 a.m. >>>

Hi,

I am trying to style individual feature with OpenLayers.Feature.Vector
statement, as this: 
               
                              *
                              lines = new
OpenLayers.Geometry.LineString([p1,p2, p3, p4, p1]);
                              polygon1 = new
OpenLayers.Feature.Vector(lines, {strokeWidth:5, 'strokeColor':
'#ff0000'});

However, it*s not working for me.

Is there anything missing? 

Thanks.

JK



Click here (
https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==
) to report this email as spam.


This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system.

This message has been scanned for Malware and Viruses by Websense Hosted Security.
www.websense.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110630/7f66a235/attachment-0001.html


More information about the Users mailing list