[OpenLayers-Users] GML and KML styleMap

Christopher Schmidt crschmidt at metacarta.com
Tue Feb 17 07:18:40 EST 2009


On Tue, Feb 17, 2009 at 11:53:12AM +0100, Andreas Hocevar wrote:
> On Tue, Feb 17, 2009 at 10:44 AM, goliah <bianchimro at gmail.com> wrote:
> > I'm trying to load a layer from a local file, using a GML or KML format
> > based on file extension, and applying the same styleMap in both cases.
> > The following code only works for GML but not for KML format.
> > The var filename is the file to load and the var layertype is the extension
> > of the file.
> >
> > Any hint?
> 
> Without knowing your KML data, my guess would be that the KML has
> inline styles, which would override your styleMap.

Assuming you're using 2.7 though, this shouldn't be an issue with
extractStyles false:

 http://trac.openlayers.org/ticket/1576

So if this is the case, then we should probably look into it and fix it.

Goliah, are you using 2.7? Does this seem like it is possibly the case?

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list