|
113 | 113 | window.fcoo.map.mainMapOptions.bsToggleBottomMenuControl = true;
|
114 | 114 |
|
115 | 115 |
|
116 |
| - window.fcoo.map.createApplication( |
| 116 | + window.fcoo.map.createApplication({ |
117 | 117 | //options
|
118 |
| - { |
119 |
| - |
120 |
| - applicationName: {da:'fcoo-maps - Overskriften', en:'fcoo-maps - The Header'}, |
| 118 | + applicationName: {da:'fcoo-maps - Overskriften', en:'fcoo-maps - The Header'}, |
121 | 119 | //*
|
122 |
| - _multiMaps: false, |
123 |
| - multiMaps: { |
124 |
| - enabled : true, |
125 |
| - maxMaps : 5, |
126 |
| - maxZoomOffset: 2 |
127 |
| - }, |
128 |
| - |
129 |
| - _multiMaps: { |
130 |
| - enabled : {mobile:false, tablet:true, desktop:true}, |
131 |
| - maxMaps : {mobile:2, tablet:3, desktop:5}, |
132 |
| - maxZoomOffset : 2 |
133 |
| - }, |
134 |
| - |
| 120 | + _multiMaps: false, |
| 121 | + multiMaps: { |
| 122 | + enabled : true, |
| 123 | + maxMaps : 5, |
| 124 | + maxZoomOffset: 2 |
| 125 | + }, |
135 | 126 |
|
| 127 | + _multiMaps: { |
| 128 | + enabled : {mobile:false, tablet:true, desktop:true}, |
| 129 | + maxMaps : {mobile:2, tablet:3, desktop:5}, |
| 130 | + maxZoomOffset : 2 |
| 131 | + }, |
136 | 132 | //*/
|
137 |
| - topMenu: { |
138 |
| - messages : "data/ifm-maps-info.json", //null or STRING or {subDir:STRING, fileName:STRING} |
139 |
| - }, |
| 133 | + topMenu: { |
| 134 | + messages : "data/ifm-maps-info.json", //null or STRING or {subDir:STRING, fileName:STRING} |
| 135 | + }, |
140 | 136 |
|
141 |
| - leftMenu: { |
142 |
| - isLayerMenu: true, |
143 |
| - buttons: { |
144 |
| - bookmark: true, |
145 |
| - share : true, |
146 |
| - load : true, |
147 |
| - save : true, |
148 |
| - reset : true, |
149 |
| - setting : true |
150 |
| - }, |
| 137 | + leftMenu: { |
| 138 | + buttons: { |
| 139 | + bookmark: true, |
| 140 | + share : true, |
| 141 | + load : true, |
| 142 | + save : true, |
| 143 | + reset : true, |
| 144 | + setting : true |
151 | 145 | },
|
| 146 | + }, |
152 | 147 |
|
153 |
| - _rightMenu: { |
154 |
| - content: [{icon:'fa-home', text:{da:'Dette er content', en:'This is content'}},{icon:'fa-car', text:{da:'Dette er content2', en:'This is content2'}}], |
155 |
| - _data: ['item1', 'item2'], |
156 |
| - _resolve: function(data, $container){} |
157 |
| - }, |
158 |
| - _keepRightMenuButton: true, |
159 |
| - |
160 |
| - bottomMenu: { //Just DEMO |
161 |
| - height : 120, |
162 |
| - handleWidth: 200, |
163 |
| - handleHeight: 26, |
164 |
| - isOpen: true, |
165 |
| - //handleClassName: 'testHandle', |
166 |
| - toggleOnHandleClick: true, |
167 |
| - hideHandleWhenOpen: true, |
168 |
| - content: [{icon:'fa-home', text:{da:'Dette er content', en:'This is content'}},{icon:'fa-car', text:{da:'Dette er content2', en:'This is content2'}}], |
169 |
| - }, |
| 148 | + _rightMenu: { |
| 149 | + content: [{icon:'fa-home', text:{da:'Dette er content', en:'This is content'}},{icon:'fa-car', text:{da:'Dette er content2', en:'This is content2'}}], |
| 150 | + _data: ['item1', 'item2'], |
| 151 | + _resolve: function(data, $container){} |
| 152 | + }, |
| 153 | + _keepRightMenuButton: true, |
| 154 | + |
| 155 | + bottomMenu: { //Just DEMO |
| 156 | + height : 120, |
| 157 | + handleWidth: 200, |
| 158 | + handleHeight: 26, |
| 159 | + isOpen: true, |
| 160 | + //handleClassName: 'testHandle', |
| 161 | + toggleOnHandleClick: true, |
| 162 | + hideHandleWhenOpen: true, |
| 163 | + content: [{icon:'fa-home', text:{da:'Dette er content', en:'This is content'}},{icon:'fa-car', text:{da:'Dette er content2', en:'This is content2'}}], |
| 164 | + }, |
170 | 165 |
|
171 |
| - _other: [{ |
172 |
| - data:{text:'Davs med dig'}, |
173 |
| - resolve: function(data){ |
174 |
| - console.log('other:'+data.text); |
175 |
| - }, |
176 |
| - reload:1 |
177 |
| - }], |
178 |
| - |
179 |
| - colorInfo: { |
180 |
| - icon : 'fa-map', // //If the MapLayer also have a legend the icon from the legend is used |
181 |
| - text : 'Only land', //STRING //If the MapLayer also have a legend the text from the legend is used |
182 |
| -// HER> onlyLand : true, //Only show when cursor/map center is over land. Default = false |
183 |
| -// HER> onlyWater: false, //Only show when cursor/map center is over water/sea. Default = false |
184 |
| - show : true, //Turn the update on/off. Default = true |
185 |
| - |
186 |
| -// HER> getColor : function(options) //Return the color (hex) to use as background-color in the infoBox. |
187 |
| - //options = {colorRGBA, colorHex, latLng} |
188 |
| - //Default = return options.colorHex |
189 |
| - //Set to false if no background-color in the infoBox is needed |
190 |
| -// HER> allowTransparentColor: BOOLEAN //If true getColor is also called on fully transparent colors |
191 |
| - |
192 |
| -// HER> getText : function(options) //Return the content (STRING or {da:STRING, en:STRING} or {icon, text}) to be displayed in the infoBox. |
| 166 | + _other: [{ |
| 167 | + data:{text:'Davs med dig'}, |
| 168 | + resolve: function(data){ |
| 169 | + console.log('other:'+data.text); |
| 170 | + }, |
| 171 | + reload:1 |
| 172 | + }], |
| 173 | + |
| 174 | + colorInfo: { |
| 175 | + icon : 'fa-map', // //If the MapLayer also have a legend the icon from the legend is used |
| 176 | + text : 'Only land', //STRING //If the MapLayer also have a legend the text from the legend is used |
| 177 | +// HER> onlyLand : true, //Only show when cursor/map center is over land. Default = false |
| 178 | +// HER> onlyWater: false, //Only show when cursor/map center is over water/sea. Default = false |
| 179 | + show : true, //Turn the update on/off. Default = true |
| 180 | + |
| 181 | +// HER> getColor : function(options) //Return the color (hex) to use as background-color in the infoBox. |
| 182 | + //options = {colorRGBA, colorHex, latLng} |
| 183 | + //Default = return options.colorHex |
| 184 | + //Set to false if no background-color in the infoBox is needed |
| 185 | +// HER> allowTransparentColor: BOOLEAN //If true getColor is also called on fully transparent colors |
| 186 | + |
| 187 | +// HER> getText : function(options) //Return the content (STRING or {da:STRING, en:STRING} or {icon, text}) to be displayed in the infoBox. |
193 | 188 | //options = {colorRGBA, colorHex, transparent, color (from getColor), latLng}
|
194 | 189 | //Default: return ""
|
195 |
| - }, |
196 |
| - |
197 |
| - |
198 |
| - |
199 |
| - finally: function(){ |
200 |
| - |
201 |
| -//HER setTimeout(function(){ |
202 |
| -//HER fcoo.map.time.setCurrentRelative(300); |
203 |
| -//HER }, 3000); |
204 |
| - |
205 |
| -//HER setTimeout(function(){ |
206 |
| -//HER fcoo.map.time.setCurrentRelative(-13); |
207 |
| -//HER }, 10000); |
208 |
| - |
209 |
| - return; |
210 |
| - if (!fcoo.map.MapLayer_Time) return; |
| 190 | + }, |
211 | 191 |
|
212 |
| - fcoo.map._addMapLayer('DETTE_ER_EN_TEST', fcoo.map.MapLayer_Time, { |
213 |
| - text:' Dette er en test', icon: 'fa-clock', |
214 |
| - layerOptions: { |
215 |
| - dataset: 'DMI/HARMONIE/DMI_NEA_MAPS_v005C.nc', |
216 |
| - layers : 'windspeed', //'UGRD:VGRD', |
217 |
| - styles : { |
218 |
| - plot_method: 'contourf', |
219 |
| - legend: 'Wind_ms_BGYRP_11colors_1.1' |
220 |
| - } |
| 192 | + finally: function(){ |
| 193 | +//HER setTimeout(function(){ |
| 194 | +//HER fcoo.map.time.setCurrentRelative(300); |
| 195 | +//HER }, 3000); |
| 196 | + |
| 197 | +//HER setTimeout(function(){ |
| 198 | +//HER fcoo.map.time.setCurrentRelative(-13); |
| 199 | +//HER }, 10000); |
| 200 | + |
| 201 | + return; |
| 202 | + if (!fcoo.map.MapLayer_Time) return; |
| 203 | + |
| 204 | + fcoo.map._addMapLayer('DETTE_ER_EN_TEST', fcoo.map.MapLayer_Time, { |
| 205 | + text:' Dette er en test', icon: 'fa-clock', |
| 206 | + layerOptions: { |
| 207 | + dataset: 'DMI/HARMONIE/DMI_NEA_MAPS_v005C.nc', |
| 208 | + layers : 'windspeed', //'UGRD:VGRD', |
| 209 | + styles : { |
| 210 | + plot_method: 'contourf', |
| 211 | + legend: 'Wind_ms_BGYRP_11colors_1.1' |
221 | 212 | }
|
222 |
| - }) |
223 |
| - .addTo([0,1]) |
224 |
| -//HER .workingOn(0); |
225 |
| - //.selectMaps(); |
226 |
| - } |
227 |
| - }, |
| 213 | + } |
| 214 | + }) |
| 215 | + .addTo([0,1]) |
| 216 | +//HER .workingOn(0); |
| 217 | + //.selectMaps(); |
| 218 | + } |
| 219 | + }, |
228 | 220 |
|
229 |
| - //Default menu-layer |
| 221 | + //Default menu-layer |
230 | 222 |
|
231 | 223 | ); //end of window.fcoo.map.createApplication
|
232 | 224 |
|
|
0 commit comments