[OpenLayers-Users] Style for Drawfeature(Polygon/Path)
Dipl. Inf. Carsten Eider
eider at fh-bingen.de
Wed Aug 6 08:38:07 EDT 2008
in between i found another solution
drawFeatureControl.handler.style=style_split;
.....
Alexandre Dube schrieb:
> You can set it in the featureAdded function of your
> drawFeatureControl. Here's an example for MultiLineString. Try to
> add the following :
>
> // featureAdded function
> oDrawControls['line'].featureAdded = function(oFeature) {
> oFeature.layer.eraseFeatures([oFeature]);
> // cast to multilinestring
> oFeature.geometry = new OpenLayers.Geometry.MultiLineString(
> oFeature.geometry
> );
> * oFeature.style = OpenLayers.Util.extend(
> {strokeColor:"#ff0000", strokeWidth: 3 }, oFeature.style);*
>
> oFeature.state = OpenLayers.State.INSERT;
> oFeature.layer.drawFeature(oFeature);
> }
>
> Regards,
>
> Alexandre
>
> Dipl. Inf. Carsten Eider wrote:
>> Any ideas where to setup the style for a drawfeatureControl?
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
>
--
Mit freundlichen Grüßen / Yours faithfully
Carsten Eider
Dipl. Inf. (FH)
Kompetenzzentrum für Innovative Informationssysteme
c/o Fachhochschhule Bingen / University of applied sciences Bingen
Berlinstraße 109
55411 Bingen
Tel: +49 (0) 6721 / 409-179
Fax: +49 (0) 6721 / 409-158
email: eider at fh-bingen.de
Internet: iis.fh-bingen.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eider.vcf
Type: text/x-vcard
Size: 330 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080806/6b0bb6a1/eider.vcf
More information about the Users
mailing list