1
1
iD . ui . MapOverlay = function ( context ) {
2
2
var key = 'F' ,
3
- admin = [ 'province' , 'municipality' , 'barangay' ] ,
4
- destination = [ 'mpa' ] ,
3
+ // admin = ['province', 'municipality', 'barangay'],
4
+ // destination = ['mpa'],
5
5
roadNetwork = [ 'openroads' ] ,
6
6
layerControls = context . container ( ) . select ( '.layer-controls' ) ,
7
7
mapControls = context . container ( ) . select ( '.map-controls' ) ;
@@ -17,13 +17,13 @@ iD.ui.MapOverlay = function(context) {
17
17
return d . id === 'ornetwork' ;
18
18
} ) ;
19
19
20
- var municipalSource = background . find ( function ( d ) {
21
- return d . id === 'municipality' ;
22
- } ) ;
20
+ // var municipalSource = background.find(function (d) {
21
+ // return d.id === 'municipality';
22
+ // });
23
23
24
- var projectSources = background . filter ( function ( d ) {
25
- return d . type === 'wmts' ;
26
- } ) ;
24
+ // var projectSources = background.filter(function (d) {
25
+ // return d.type === 'wmts';
26
+ // });
27
27
28
28
function map_overlay ( selection ) {
29
29
@@ -93,29 +93,29 @@ iD.ui.MapOverlay = function(context) {
93
93
activeOverlay ,
94
94
function ( d ) { return d . description ; } ) ;
95
95
96
- projectList . call ( drawList ,
97
- projectSources ,
98
- 'checkbox' ,
99
- 'project' ,
100
- toggleOverlay ,
101
- activeOverlay ,
102
- function ( d ) { return d . description ; } ) ;
103
-
104
- governmentList . call ( drawList ,
105
- admin . slice ( 1 , 2 ) ,
106
- 'checkbox' ,
107
- 'admin_level' ,
108
- getToggleSource ( municipalSource ) ,
109
- getActiveSource ( municipalSource ) ,
110
- description ( 'admin_level' ) ) ;
111
-
112
- destinationList . call ( drawList ,
113
- destination ,
114
- 'checkbox' ,
115
- 'destination' ,
116
- function ( ) { } ,
117
- function ( ) { } ,
118
- description ( 'destination' ) ) ;
96
+ // projectList.call(drawList,
97
+ // projectSources,
98
+ // 'checkbox',
99
+ // 'project',
100
+ // toggleOverlay,
101
+ // activeOverlay,
102
+ // function (d) { return d.description; });
103
+
104
+ // governmentList.call(drawList,
105
+ // admin.slice(1, 2),
106
+ // 'checkbox',
107
+ // 'admin_level',
108
+ // getToggleSource(municipalSource),
109
+ // getActiveSource(municipalSource),
110
+ // description('admin_level'));
111
+
112
+ // destinationList.call(drawList,
113
+ // destination,
114
+ // 'checkbox',
115
+ // 'destination',
116
+ // function () {},
117
+ // function () {},
118
+ // description('destination'));
119
119
120
120
content . select ( '.toggle-switch input' )
121
121
. property ( 'checked' , context . background ( ) . showsLayer ( gridSource ) ) ;
@@ -218,48 +218,48 @@ iD.ui.MapOverlay = function(context) {
218
218
roadToggle . on ( 'click' , toggleDropdown ( roadNetworkContainer ) ) ;
219
219
220
220
// projects
221
- var projectToggle = content . append ( 'a' )
222
- . text ( t ( 'map_overlay.projects' ) )
223
- . attr ( 'href' , '#' )
224
- . classed ( 'hide-toggle' , true )
225
- . classed ( 'expanded' , true ) ;
221
+ // var projectToggle = content.append('a')
222
+ // .text(t('map_overlay.projects'))
223
+ // .attr('href', '#')
224
+ // .classed('hide-toggle', true)
225
+ // .classed('expanded', true);
226
226
227
- var projectContainer = content . append ( 'div' )
228
- . attr ( 'class' , 'filters' ) ;
227
+ // var projectContainer = content.append('div')
228
+ // .attr('class', 'filters');
229
229
230
- var projectList = projectContainer . append ( 'ul' )
231
- . attr ( 'class' , 'overlay-list' ) ;
230
+ // var projectList = projectContainer.append('ul')
231
+ // .attr('class', 'overlay-list');
232
232
233
- projectToggle . on ( 'click' , toggleDropdown ( projectContainer ) ) ;
233
+ // projectToggle.on('click', toggleDropdown(projectContainer));
234
234
235
235
// government layers
236
- var governmentToggle = content . append ( 'a' )
237
- . text ( t ( 'map_overlay.government' ) )
238
- . attr ( 'href' , '#' )
239
- . classed ( 'hide-toggle' , true )
240
- . classed ( 'expanded' , true ) ;
236
+ // var governmentToggle = content.append('a')
237
+ // .text(t('map_overlay.government'))
238
+ // .attr('href', '#')
239
+ // .classed('hide-toggle', true)
240
+ // .classed('expanded', true);
241
241
242
- var governmentFeatures = content . append ( 'div' )
243
- . attr ( 'class' , 'filters' ) ;
242
+ // var governmentFeatures = content.append('div')
243
+ // .attr('class', 'filters');
244
244
245
- var governmentList = governmentFeatures . append ( 'ul' )
246
- . attr ( 'class' , 'overlay-list' ) ;
245
+ // var governmentList = governmentFeatures.append('ul')
246
+ // .attr('class', 'overlay-list');
247
247
248
- governmentToggle . on ( 'click' , toggleDropdown ( governmentFeatures ) ) ;
248
+ // governmentToggle.on('click', toggleDropdown(governmentFeatures));
249
249
250
- var destinationToggle = content . append ( 'a' )
251
- . text ( t ( 'map_overlay.destination' ) )
252
- . attr ( 'href' , '#' )
253
- . classed ( 'hide-toggle' , true )
254
- . classed ( 'expanded' , true ) ;
250
+ // var destinationToggle = content.append('a')
251
+ // .text(t('map_overlay.destination'))
252
+ // .attr('href', '#')
253
+ // .classed('hide-toggle', true)
254
+ // .classed('expanded', true);
255
255
256
- var destinationContainer = content . append ( 'div' )
257
- . attr ( 'class' , 'filters' ) ;
256
+ // var destinationContainer = content.append('div')
257
+ // .attr('class', 'filters');
258
258
259
- var destinationList = destinationContainer . append ( 'ul' )
260
- . attr ( 'class' , 'overlay-list' ) ;
259
+ // var destinationList = destinationContainer.append('ul')
260
+ // .attr('class', 'overlay-list');
261
261
262
- destinationToggle . on ( 'click' , toggleDropdown ( destinationContainer ) ) ;
262
+ // destinationToggle.on('click', toggleDropdown(destinationContainer));
263
263
264
264
if ( gridSource ) {
265
265
content . append ( 'span' )
0 commit comments