[OpenLayers-Users] Problem with multiple styles in KML file
Alexandru IOVANOVICI
iovanalex at gmail.com
Wed Jul 8 04:07:54 EDT 2009
Hello,
I'm using OpenLayers to display a kml file representing some line segments.
Each segment is colored differently, according to the speed mesured on that
segment. So i have a php script wich generates the kml and the following
openLayers code:
var speeds = new OpenLayers.Layer.Vector("Avg speed", {
projection: new OpenLayers.Projection("EPSG:4326"),
strategies: [
new OpenLayers.Strategy.BBOX()
//new OpenLayers.Strategy.Cluster()
],
protocol: new OpenLayers.Protocol.HTTP({
url: "getKml.php",
format: new OpenLayers.Format.KML({
extractStyles: false,
extractAttributes: false
}),
params: {zoom:this.map.getZoom()}
})
});
Here you have a dump of the kmlFile:
http://wikitrafic.iovanalex.ro/site/getKml2.kml
My problem is that I cannot see any diference in style, even the kml file
contains segements with diferent styles, as you can see.
Also if a open it on Google Maps, the same thing happens: all the lines are
Google-yellow.
So my question is: what is wrong with my KML file. I'm I missing something
from the definition of the file ? I have checked it with an online validator
and it seems ok.
Thank you,
Alexandru IOVANOVICI.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090708/af3543dd/attachment.html
More information about the Users
mailing list