File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change 16
16
< script >
17
17
L . mapbox . accessToken = 'pk.eyJ1IjoicmltYWtlcm1hcCIsImEiOiJkYTc3OWJiMDE5MjljZjk0ZDFiOTk2YmViOTQzMjYyZSJ9.aSNuiI45yGrpoG8QvB0x2A' ;
18
18
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
+
20
52
</ script >
21
53
</ body >
22
54
</ html >
You can’t perform that action at this time.
0 commit comments