Skip to content

Instantly share code, notes, and snippets.

@erikhazzard
Created November 3, 2011 22:46
Show Gist options
  • Save erikhazzard/1338153 to your computer and use it in GitHub Desktop.
Save erikhazzard/1338153 to your computer and use it in GitHub Desktop.
KML extractAttributes style override
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css">
<link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css">
<style>
polyline, polygon, circle{
stroke: #336699;
stroke-width: 10px;
}
</style>
</head>
<body>
<h1 id="title">KML Layer Example</h1>
<div id="tags">KML</div>
<p id="shortdesc">
Demonstrates loading and displaying a KML file on top of a basemap.
</p>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
A vector layer can be populated with features from a KML document
by configuring the layer with an HTTP protocol that points to the
KML document and is configured with a KML format for parsing features.
The fixed strategy is used to load all features at once.
</p>
<p>
View the <a href="kml-layer.js" target="_blank">kml-layer.js</a>
source to see how this is done.
</p>
</div>
<script src="http://openlayers.org/dev/OpenLayers.js"></script>
<script src="http://openlayers.org/dev/examples/kml-layer.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment