Skip to content

Commit 679667a

Browse files
committed
New sample map with point
1 parent c1f94d0 commit 679667a

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

makermap/index.html

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,39 @@
1616
<script>
1717
L.mapbox.accessToken = 'pk.eyJ1IjoicmltYWtlcm1hcCIsImEiOiJkYTc3OWJiMDE5MjljZjk0ZDFiOTk2YmViOTQzMjYyZSJ9.aSNuiI45yGrpoG8QvB0x2A';
1818
var map = L.mapbox.map('map', 'mapbox.streets')
19-
.setView([40, -74.50], 9);
19+
.setView([40, -74.50], 9);
20+
21+
// var featureLayer = L.mapbox.featureLayer()
22+
// .addTo(map);
23+
24+
// featureLayer.loadURL('sample_points.geojson');
25+
26+
var featureLayer = L.mapbox.featureLayer({
27+
// this feature is in the GeoJSON format: see geojson.org
28+
// for the full specification
29+
type: 'Feature',
30+
geometry: {
31+
type: 'Point',
32+
// coordinates here are in longitude, latitude order because
33+
// x, y is the standard for GeoJSON and many formats
34+
coordinates: [
35+
-77.03221142292,
36+
38.913371603574
37+
]
38+
},
39+
properties: {
40+
title: 'Peregrine Espresso',
41+
description: '1718 14th St NW, Washington, DC',
42+
// one can customize markers by adding simplestyle properties
43+
// https://www.mapbox.com/guides/an-open-platform/#simplestyle
44+
'marker-size': 'large',
45+
'marker-color': '#BE9A6B',
46+
'marker-symbol': 'cafe'
47+
}
48+
}).addTo(map);
49+
50+
// var featureLayer = L.mapbox.featureLayer().addTo(map);
51+
2052
</script>
2153
</body>
2254
</html>

0 commit comments

Comments
 (0)