[OpenLayers-Dev] How to modify GML style
Gorka López Rivacoba
gorka.lopez.rivacoba at gmail.com
Tue Sep 9 09:49:24 EDT 2008
Hi Alexandre,
This is just what I want,
Thanks a lot. Regards,
Gorka López
2008/9/9 Alexandre Dube <adube at mapgears.com>
> Hi Gorka,
>
> You can style your features with a StyleMap object. Here's an example
> using a WFS layer, but this is pretty much the same as GML, since both are
> vector layers.
>
> // styleMap for region
> oRegStyleMap = new OpenLayers.StyleMap({
> strokeColor: "black",
> strokeWidth: 2,
> strokeOpacity: 1
> fillOpacity: 0.3,
> fillColor:"purple"
> });
>
> // region WFS layer, contains polygon features
> olWFSReg = new OpenLayers.Layer.WFS(
> "Régions admin. - WFS",
> sMSURL,
> {
> typename: "BDGA_REGIO_S_POLY_1M",
> map: sBDGAMapPath
> },
> {
> extractAttributes: true,
> typename: "BDGA_REGIO_S_POLY_1M",
> styleMap: oRegStyleMap // <------
> }
> );
>
> Hope this helps,
>
> Alexandre
>
> Gorka López Rivacoba wrote:
>
>> Hello,
>> I'm loading a route with GML in my map, but the line which appears (the
>> yellow one) is too similar to my map. I'm reading the code, but I don't find
>> any solution
>> Is there any solution to modify the style of these lines?
>> Thanks a lot. Regards,
>> Gorka López
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Dev mailing list
>> Dev at openlayers.org
>> http://openlayers.org/mailman/listinfo/dev
>>
>>
>
>
> --
> Alexandre Dubé
> Mapgears
> www.mapgears.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20080909/adad48d7/attachment.html
More information about the Dev
mailing list