This repository was archived by the owner on Dec 6, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,12 @@ const map = createMap({
7373
7474const depCoords = L .latLng (< ? php echo $mapdata- > deplat? > , < ? php echo $mapdata- > deplng;? > );
7575const depMarker = L .marker (depCoords, {
76- icon: L.icon({ iconUrl: depicon } )
76+ icon: L.icon({ iconUrl: depicon, iconSize: [35, 35] } )
7777} ).bindPopup (" <?php echo $mapdata->depname;?>" ).addTo (map);
7878
7979const arrCoords = L .latLng (< ? php echo $mapdata- > arrlat? > , < ? php echo $mapdata- > arrlng;? > );
8080const arrMarker = L .marker (arrCoords, {
81- icon: L.icon({ iconUrl: arricon } )
81+ icon: L.icon({ iconUrl: arricon, iconSize: [35, 35] } )
8282} ).bindPopup (" <?php echo $mapdata->arrname;?>" ).addTo (map);
8383
8484const icon_vor = L .icon ({
@@ -93,6 +93,7 @@ const icon_fix = L.icon({
9393// for drawing the line
9494let points = [];
9595points .push (depCoords);
96+
9697< ? php
9798if (is_array ($mapdata- > route_details)) {
9899 foreach ($mapdata -> route_details as $route ) {
@@ -121,7 +122,6 @@ if(is_array($mapdata->route_details)) {
121122 } )
122123 .bindPopup(tmpl(" navpoint_bubble" , { nav: v< ?php echo $route -> name ?> _info} ))
123124 .addTo(map);
124-
125125 < ?php
126126 }
127127}
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const createMap = (opts) => {
1010 maxZoom : 10 ,
1111 layers : [ ] ,
1212 set_marker : false ,
13+ provider : 'OpenStreetMap.Mapnik' ,
1314 } , opts ) ;
1415
1516 const openaip_basemap_phys_osm = L . featureGroup ( feature_groups ) ;
@@ -23,7 +24,7 @@ const createMap = (opts) => {
2324 // http://leaflet-extras.github.io/leaflet-providers/preview/
2425 // Just set the provider name that you want below, or add additional
2526 // Some providers require an API key, so just look out for that
26- L . tileLayer . provider ( 'OpenStreetMap.Mapnik' ) . addTo ( map ) ;
27+ L . tileLayer . provider ( opts . provider ) . addTo ( map ) ;
2728
2829 return map
2930} ;
You can’t perform that action at this time.
0 commit comments