Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
54 lines (49 loc) · 1.72 KB
/
Copy pathindex.html
File metadata and controls
54 lines (49 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Maker Map</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.9/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.9/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<div id='map'></div>
<script>
L.mapbox.accessToken = 'pk.eyJ1IjoicmltYWtlcm1hcCIsImEiOiJkYTc3OWJiMDE5MjljZjk0ZDFiOTk2YmViOTQzMjYyZSJ9.aSNuiI45yGrpoG8QvB0x2A';
var map = L.mapbox.map('map', 'mapbox.streets')
.setView([40, -74.50], 9);
// var featureLayer = L.mapbox.featureLayer()
// .addTo(map);
// featureLayer.loadURL('sample_points.geojson');
var featureLayer = L.mapbox.featureLayer({
// this feature is in the GeoJSON format: see geojson.org
// for the full specification
type: 'Feature',
geometry: {
type: 'Point',
// coordinates here are in longitude, latitude order because
// x, y is the standard for GeoJSON and many formats
coordinates: [
-77.03221142292,
38.913371603574
]
},
properties: {
title: 'Peregrine Espresso',
description: '1718 14th St NW, Washington, DC',
// one can customize markers by adding simplestyle properties
// https://www.mapbox.com/guides/an-open-platform/#simplestyle
'marker-size': 'large',
'marker-color': '#BE9A6B',
'marker-symbol': 'cafe'
}
}).addTo(map);
// var featureLayer = L.mapbox.featureLayer().addTo(map);
</script>
</body>
</html>