This repository was archived by the owner on Dec 6, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +754
-12
lines changed Expand file tree Collapse file tree 3 files changed +754
-12
lines changed Original file line number Diff line number Diff line change 33 */
44
55const createMap = ( opts ) => {
6-
76 opts = Object . assign ( {
87 render_elem : 'map' ,
98 center : [ 29.98139 , - 95.33374 ] ,
@@ -13,23 +12,18 @@ const createMap = (opts) => {
1312 set_marker : false ,
1413 } , opts ) ;
1514
16- let feature_groups = [ ] ;
17- const opencyclemap_phys_osm = new L . TileLayer (
18- 'https://a.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png' , {
19- maxZoom : 15 ,
20- noWrap : true ,
21- attribution : 'Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL.'
22- } ) ;
23-
24- feature_groups . push ( opencyclemap_phys_osm ) ;
25-
2615 const openaip_basemap_phys_osm = L . featureGroup ( feature_groups ) ;
2716 let map = L . map ( opts . render_elem , {
28- layers : [ openaip_basemap_phys_osm ] ,
2917 center : opts . center ,
3018 zoom : opts . zoom ,
3119 scrollWheelZoom : false ,
3220 } ) ;
3321
22+ // Want to customizer the basemap? Look at the leaflet-providers page:
23+ // http://leaflet-extras.github.io/leaflet-providers/preview/
24+ // Just set the provider name that you want below, or add additional
25+ // Some providers require an API key, so just look out for that
26+ L . tileLayer . provider ( 'OpenStreetMap.Mapnik' ) . addTo ( map ) ;
27+
3428 return map
3529} ;
You can’t perform that action at this time.
0 commit comments