-
-
Notifications
You must be signed in to change notification settings - Fork 42
/
simplify-export-options_3.6.js
30 lines (22 loc) · 1.12 KB
/
simplify-export-options_3.6.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
lizMap.events.on({
'uicreated': function(e) {
// Simplify the export options in selection tool
// List of keeping formats
// GEOJSON, GML, SHP, TAB, MIF, KML, GPKG, GPX, ODS, XLSX, CSV
var enabledFormat = ['XLSX', 'ODS', 'CSV'];
$('#selectiontool div.selectiontool-actions div.selectiontool-export ul.selectiontool-export-formats li').filter(function(idx, elt){
//console.log($(elt).text());
return enabledFormat.indexOf($(elt).text().toUpperCase()) == -1;
}).remove();
},
'attributeLayerContentReady': function(e) {
// Simplify the export options in attribute table tab
// List of keeping formats
// GEOJSON, GML, SHP, TAB, MIF, KML, GPKG, GPX, ODS, XLSX, CSV
var enabledFormat = ['XLSX', 'ODS', 'CSV'];
$('#attribute-layer-main-'+e.featureType+' div.attribute-layer-action-bar div.export-formats ul.dropdown-menu li').filter(function(idx, elt){
//console.log($(elt).text());
return enabledFormat.indexOf($(elt).text().toUpperCase()) == -1;
}).remove();
},
});