KML Layer
This example shows how you can easily add a KML layer to an NPMap web map. When you add a KML layer to an NPMap web map, you get basic display and identify support, along with integration with the route module, out of the box.
Related resources:
Map
Code
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div id="example-map" style="height:500px;position:absolute;width:500px;">
</div>
<script>
var NPMap = NPMap || {};
NPMap.config = {
api: 'bing',
center: {
lat: 38.921985,
lng: -77.028494
},
div: 'example-map',
layers: [{
name: 'DC Data',
type: 'Kml',
url: 'http://www.nps.gov/npmap/support/library/examples/data/dc.kml'
}],
zoom: 12
};
(function() {
var s = document.createElement('script');
s.src = 'http://www.nps.gov/npmap/1.0.0/bootstrap.js';
document.body.appendChild(s);
})();
</script>
</body>
</html>