-
-
Save seanbehan/3990378 to your computer and use it in GitHub Desktop.
leaflet simple example of portland point
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" /> | |
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script> | |
</head> | |
<body> | |
<div id="map" style="width: 100%; height: 100%"></div> | |
<script> | |
var map = new L.Map('map'); | |
var osm = new L.TileLayer('http://tile.osm.org/{z}/{x}/{y}.png'); | |
map.setView(new L.LatLng(45.5, -122.65), 12).addLayer(osm); | |
var pdx = { "type": "FeatureCollection", "features": [ { "type": "Feature", | |
"properties": { "name": "PDX" }, | |
"geometry" : { "type": "Point","coordinates": [ -122.65, 45.5 ]}}] | |
}; | |
map.addLayer(new L.GeoJSON(pdx)); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment