Add KML Styling support. Thanks rdewit for this great contribution. r=crschmidt,me (closes #1259)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@6179 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2008-02-09 20:42:32 +00:00
parent 06571e2cf3
commit c70fb21103
3 changed files with 556 additions and 21 deletions
+8 -1
View File
@@ -20,7 +20,14 @@
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml", {format: OpenLayers.Format.KML}));
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml",
{
format: OpenLayers.Format.KML,
formatOptions: {
extractStyles: true,
extractAttributes: true
}
}));
map.zoomToExtent(new OpenLayers.Bounds(-112.306698,36.017792,-112.03204,36.18087));
}
</script>