Update KML layer example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10875 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
22
examples/kml-layer.js
Normal file
22
examples/kml-layer.js
Normal file
@@ -0,0 +1,22 @@
|
||||
var map = new OpenLayers.Map({
|
||||
div: "map",
|
||||
layers: [
|
||||
new OpenLayers.Layer.WMS(
|
||||
"WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",
|
||||
{layers: "basic"}
|
||||
),
|
||||
new OpenLayers.Layer.Vector("KML", {
|
||||
strategies: [new OpenLayers.Strategy.Fixed()],
|
||||
protocol: new OpenLayers.Protocol.HTTP({
|
||||
url: "kml/lines.kml",
|
||||
format: new OpenLayers.Format.KML({
|
||||
extractStyles: true,
|
||||
extractAttributes: true,
|
||||
maxDepth: 2
|
||||
})
|
||||
})
|
||||
})
|
||||
],
|
||||
center: new OpenLayers.LonLat(-112.169, 36.099),
|
||||
zoom: 11
|
||||
});
|
||||
Reference in New Issue
Block a user