Carlos,
Carlos Pinto wrote:
> var mylayer = new OpenLayers.Layer.GML("GML",
> "../KML/MyPolygons.xml",{styleMap: styleMap} );
> map.addLayer(mylayer);
> }
>
>
> but one thing funny is that if I use the line
>
> myLayer.styleMap = styleMap;
>
> it does not work
>
You have to add that line _before_ map.addLayer(), otherwise you have to
redraw the layer.
I just tried both setting the styleMap in the constructor and assigning
later, and both worked on a GML layer.
Regards,
Andreas.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users