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 +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 104104Config::Set ('MAP_LINE_COLOR ' , '#ff0000 ' );
105105Config::Set ('MAP_CENTER_LAT ' , '45.484400 ' );
106106Config::Set ('MAP_CENTER_LNG ' , '-62.334821 ' );
107- Config::Set ('MAP_ZOOM_LEVEL ' , 12 );
107+ Config::Set ('MAP_ZOOM_LEVEL ' , 5 );
108108
109109# ACARS options
110110# Minutes, flights to show on the ACARS
Original file line number Diff line number Diff line change @@ -152,7 +152,7 @@ const opts = {
152152 render_elem: ' acarsmap' ,
153153 provider: ' <?php echo Config::Get("MAP_TYPE"); ?>' ,
154154 autozoom: true ,
155- zoom: 5 ,
155+ zoom: < ?php echo Config::Get( ' MAP_ZOOM_LEVEL ' ); ? > ,
156156 center: L.latLng(" <?php echo Config::Get('MAP_CENTER_LAT'); ?>" , " <?php echo Config::Get('MAP_CENTER_LNG'); ?>" ),
157157 refreshTime: 10000
158158} ;
Original file line number Diff line number Diff line change @@ -21,8 +21,10 @@ const MapFeatures = {
2121} ;
2222
2323/**
24- * Create a new map onto a given element
25- * @param { } opts
24+ * Create a new map onto a given element. If you have or want to add
25+ * any Leaflet plugins, just apply them here above the return statement
26+ * They'll be applied to both the ACARS and PIREP maps
27+ * @param { } opts Options to override
2628 */
2729const createMap = ( opts ) => {
2830 opts = Object . assign ( {
@@ -38,7 +40,7 @@ const createMap = (opts) => {
3840 let map = L . map ( opts . render_elem , {
3941 center : opts . center ,
4042 zoom : opts . zoom ,
41- scrollWheelZoom : false ,
43+ scrollWheelZoom : true ,
4244 } ) ;
4345
4446 // Want to customizer the basemap? Look at the leaflet-providers page:
@@ -47,5 +49,5 @@ const createMap = (opts) => {
4749 // Some providers require an API key, so just look out for that
4850 L . tileLayer . provider ( opts . provider ) . addTo ( map ) ;
4951
50- return map
52+ return map ;
5153} ;
You can’t perform that action at this time.
0 commit comments