UNPKG

npmap.js

Version:

A JavaScript web mapping library, built as a Leaflet plugin, for the National Park Service.

69 lines (67 loc) 1.7 kB
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no"> <title>GeoJSON Layer (Clustered) | Examples | NPMap.js</title> <style> body { margin: 0; padding: 0; } #map { bottom: 0; position: absolute; top: 0; width: 100%; } </style> </head> <body> <div id="map"></div> <script> var NPMap = { center: { lat: 45.3058, lng: -116.7187 }, div: 'map', overlays: [{ filter: function(feature) { return feature.properties.park === 'Yellowstone'; }, maki: { name: 'star' }, popup: { description: 'This is {{#if type \'!==\' \'community\'}}not {{/if}}a community.', title: '{{name}}' }, type: 'geojson', url: 'data/gateway_points_of_interest.geojson' },{ cluster: { clusterIcon: '#000', maxClusterRadius: 70 }, maki: { color: '#609321', name: 'park' }, popup: { description: 'The alpha code is {{Code}}', title: '{{Name}}' }, type: 'geojson', url: 'http://www.nps.gov/npmap/support/library/examples/data/national-parks.geojson' }], zoom: 6 }; (function() { var s = document.createElement('script'); s.src = '../dist/npmap-bootstrap.js'; document.body.appendChild(s); })(); </script> </body> </html>