[OpenLayers-Users] Layer rendering
Christopher Schmidt
crschmidt at metacarta.com
Tue Feb 26 11:17:27 EST 2008
On Tue, Feb 26, 2008 at 04:13:10PM +0100, Carlos Pinto wrote:
> Hi all,
>
> Can anyone explain why when I run the example:
>
> http://www.openlayers.org/dev/examples/kml-layer.html
>
> it appears a line and 3 polygons with 3 different colors and if I use
> exactly the same code with the same layer, the polygons are replaced by one
> line?????
>
> The code is this:
>
> map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml",
> {
> format: OpenLayers.Format.KML,
> formatOptions: {
> extractStyles: true,
> extractAttributes: true
> }
> }));
>
> and in fact, the layer has three polygons with different colors. What am I
> missing.
>
> I have try also to reference the library that it is online but i still stay
> with out seeing the polygons.
>
> Can anyone explain this?
What version of OpenLayers are you using? Probably not 2.6; possibly not
2.5? It sounds like 2.4, though to be honest, there's no polygons
anywhere in this demo, so perhaps I'm confused. In any case, if you're
not using a recent trunk, you won't have decent KML styling support,,
which it sounds like might be your question.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list