[OpenLayers-Users] Layer rendering
Carlos Pinto
cmspinto at gmail.com
Tue Feb 26 11:27:48 EST 2008
Your absolutely right, I discover thet only using the version "<script src="
http://www.openlayers.org/dev/lib/OpenLayers.js"></script>" could be
possible to apply styles to the KML file.
So what is the best way to have good style on polygons?
GML does not have either and I was trying to avoid customizing one by one.
I need to draw a grid with ten classes and the simplest way it seemed to
have a GML or KML file with all the polygons connected to a style!!!!
Thanks for your help
Carlos
On Tue, Feb 26, 2008 at 5:17 PM, Christopher Schmidt <
crschmidt at metacarta.com> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080226/8b516f61/attachment.html
More information about the Users
mailing list