mapshaper 0.6.76 → 0.6.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mapshaper.js +17 -9
- package/package.json +1 -1
- package/www/index.html +35 -48
- package/www/mapshaper-gui.js +1097 -987
- package/www/mapshaper.js +17 -9
- package/www/page.css +60 -108
package/www/mapshaper.js
CHANGED
|
@@ -1537,7 +1537,6 @@
|
|
|
1537
1537
|
this.xmax = c;
|
|
1538
1538
|
this.ymax = d;
|
|
1539
1539
|
if (a > c || b > d) this.update();
|
|
1540
|
-
// error("Bounds#setBounds() min/max reversed:", a, b, c, d);
|
|
1541
1540
|
return this;
|
|
1542
1541
|
};
|
|
1543
1542
|
|
|
@@ -5123,10 +5122,12 @@
|
|
|
5123
5122
|
if (!P && info.prj) {
|
|
5124
5123
|
P = parseCrsString(translatePrj(info.prj));
|
|
5125
5124
|
}
|
|
5126
|
-
if (!P
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5125
|
+
if (!P) {
|
|
5126
|
+
if (probablyDecimalDegreeBounds(getDatasetBounds(dataset))) {
|
|
5127
|
+
// use wgs84 for probable latlong datasets with unknown datums
|
|
5128
|
+
str = 'wgs84';
|
|
5129
|
+
P = parseCrsString(str);
|
|
5130
|
+
}
|
|
5130
5131
|
}
|
|
5131
5132
|
return {
|
|
5132
5133
|
crs: P || null,
|
|
@@ -7202,6 +7203,12 @@
|
|
|
7202
7203
|
return bounds;
|
|
7203
7204
|
}
|
|
7204
7205
|
|
|
7206
|
+
function datasetIsEmpty(dataset) {
|
|
7207
|
+
return dataset.layers.every(function(lyr) {
|
|
7208
|
+
return layerIsEmpty(lyr);
|
|
7209
|
+
});
|
|
7210
|
+
}
|
|
7211
|
+
|
|
7205
7212
|
function datasetHasGeometry(dataset) {
|
|
7206
7213
|
return utils.some(dataset.layers, function(lyr) {
|
|
7207
7214
|
return layerHasGeometry(lyr);
|
|
@@ -7315,6 +7322,7 @@
|
|
|
7315
7322
|
copyDatasetForExport: copyDatasetForExport,
|
|
7316
7323
|
copyDatasetForRenaming: copyDatasetForRenaming,
|
|
7317
7324
|
getDatasetBounds: getDatasetBounds,
|
|
7325
|
+
datasetIsEmpty: datasetIsEmpty,
|
|
7318
7326
|
datasetHasGeometry: datasetHasGeometry,
|
|
7319
7327
|
datasetHasPaths: datasetHasPaths,
|
|
7320
7328
|
cleanupArcs: cleanupArcs,
|
|
@@ -13449,7 +13457,7 @@
|
|
|
13449
13457
|
// range = Math.min(w, h) + 1e-8,
|
|
13450
13458
|
range = Math.max(w, h) + 1e-8,
|
|
13451
13459
|
digits = 0;
|
|
13452
|
-
while (range < 2000) {
|
|
13460
|
+
while (range < 2000 && digits < 1) {
|
|
13453
13461
|
range *= 10;
|
|
13454
13462
|
digits++;
|
|
13455
13463
|
}
|
|
@@ -29352,7 +29360,7 @@ ${svg}
|
|
|
29352
29360
|
// * In TopoJSON input, it makes sense to think of the last object/layer
|
|
29353
29361
|
// as the topmost one -- it corresponds to the painter's algorithm and
|
|
29354
29362
|
// the way that objects are ordered in SVG.
|
|
29355
|
-
var lyr = targ
|
|
29363
|
+
var lyr = targ?.layers[targ.layers.length - 1];
|
|
29356
29364
|
return targ ? {layer: lyr, dataset: targ.dataset} : null;
|
|
29357
29365
|
};
|
|
29358
29366
|
|
|
@@ -45136,7 +45144,7 @@ ${svg}
|
|
|
45136
45144
|
opts.target, getFormattedLayerList(job.catalog)));
|
|
45137
45145
|
}
|
|
45138
45146
|
if (!commandAcceptsEmptyTarget(name)) {
|
|
45139
|
-
|
|
45147
|
+
stop("No data is available");
|
|
45140
45148
|
}
|
|
45141
45149
|
}
|
|
45142
45150
|
|
|
@@ -45522,7 +45530,7 @@ ${svg}
|
|
|
45522
45530
|
});
|
|
45523
45531
|
}
|
|
45524
45532
|
|
|
45525
|
-
var version = "0.6.
|
|
45533
|
+
var version = "0.6.77";
|
|
45526
45534
|
|
|
45527
45535
|
// Parse command line args into commands and run them
|
|
45528
45536
|
// Function takes an optional Node-style callback. A Promise is returned if no callback is given.
|
package/www/page.css
CHANGED
|
@@ -31,7 +31,7 @@ html, body {
|
|
|
31
31
|
|
|
32
32
|
body {
|
|
33
33
|
overflow: hidden;
|
|
34
|
-
background-color: #
|
|
34
|
+
background-color: #f8fdff;
|
|
35
35
|
font: 14px/1.4 'Source Sans Pro', Arial, sans-serif;
|
|
36
36
|
color: #444;
|
|
37
37
|
user-select: none;
|
|
@@ -40,6 +40,10 @@ body {
|
|
|
40
40
|
cursor: default;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
body.map-view {
|
|
44
|
+
background-color: #fff;
|
|
45
|
+
}
|
|
46
|
+
|
|
43
47
|
.fade-out {
|
|
44
48
|
animation: fadeOut ease forwards 0.6s;
|
|
45
49
|
}
|
|
@@ -178,12 +182,16 @@ body {
|
|
|
178
182
|
text-decoration: none;
|
|
179
183
|
}
|
|
180
184
|
|
|
185
|
+
#mode-buttons.page-header-buttons {
|
|
186
|
+
display: none;
|
|
187
|
+
|
|
188
|
+
}
|
|
189
|
+
|
|
181
190
|
.page-header-buttons {
|
|
182
191
|
z-index: 20;
|
|
183
192
|
position: absolute;
|
|
184
193
|
top: 0px;
|
|
185
194
|
right: 0px;
|
|
186
|
-
display: none;
|
|
187
195
|
margin: 0 6px 3px 0;
|
|
188
196
|
}
|
|
189
197
|
|
|
@@ -202,6 +210,7 @@ body {
|
|
|
202
210
|
.page-header .header-btn.disabled,
|
|
203
211
|
.page-header .header-btn.disabled:hover {
|
|
204
212
|
background-color: transparent;
|
|
213
|
+
opacity: 0.5;
|
|
205
214
|
}
|
|
206
215
|
|
|
207
216
|
.page-header .btn.header-btn.active,
|
|
@@ -331,105 +340,28 @@ div.alert-box {
|
|
|
331
340
|
|
|
332
341
|
/* --- Splash screen -------------- */
|
|
333
342
|
|
|
334
|
-
.
|
|
335
|
-
|
|
343
|
+
.import-instructions {
|
|
344
|
+
margin: 7px 0 0 0;
|
|
336
345
|
}
|
|
337
346
|
|
|
338
|
-
.
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
.queued-files.splash-screen #import-options-drop-area {
|
|
343
|
-
display: block;
|
|
344
|
-
z-index: 2;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
#import-options-drop-area .drop-area {
|
|
348
|
-
height: 100%;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
#splash-screen {
|
|
352
|
-
z-index: 1;
|
|
353
|
-
text-align: center;
|
|
347
|
+
.mini-drop-area {
|
|
348
|
+
border: 1.5px dashed #bbb;
|
|
349
|
+
max-width: 240px;
|
|
350
|
+
border-radius: 9px;
|
|
354
351
|
font-size: 15px;
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
#splash-screen .subtitle {
|
|
363
|
-
color: #777;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
.splash-screen #import-options .info-box {
|
|
367
|
-
margin-top: 40px;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.queued-files #import-options {
|
|
371
|
-
display: block;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
#splash-screen *,
|
|
375
|
-
#import-options-drop-area * {
|
|
376
|
-
box-sizing: border-box;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
.drop-area {
|
|
380
|
-
border: 2px dashed #a2a2a2;
|
|
381
|
-
border-radius: 19px;
|
|
382
|
-
background-color: #f8fdff;
|
|
383
|
-
overflow: hidden;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
#splash-screen .drop-area.dragover,
|
|
387
|
-
body.dragover #import-options-drop-area .drop-area {
|
|
388
|
-
border-color: #333;
|
|
352
|
+
line-height: 1.5;
|
|
353
|
+
color: #888;
|
|
354
|
+
/* background-color: #FFFEF8;*/
|
|
355
|
+
padding: 6px 4px 7px 7px;
|
|
356
|
+
padding: 11px 14px;
|
|
357
|
+
margin: 9px -1px 3px -1px;
|
|
358
|
+
min-height: 120px;
|
|
389
359
|
}
|
|
390
360
|
|
|
391
|
-
#drop-areas {
|
|
392
|
-
margin-top: 30px;
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.drop-area-wrapper {
|
|
396
|
-
padding: 16px 16px 15px 16px;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
.catalog-mode #import-drop,
|
|
400
|
-
.catalog-mode #import-quick-drop,
|
|
401
361
|
.catalog-mode .file-catalog {
|
|
402
362
|
height: 32%;
|
|
403
363
|
}
|
|
404
364
|
|
|
405
|
-
#import-drop {
|
|
406
|
-
height: 61.6%;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
#import-quick-drop {
|
|
410
|
-
height: 37%;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.queued-files #splash-screen {
|
|
414
|
-
display: none;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/* between the two drop areas */
|
|
418
|
-
#splash-screen .spacer {
|
|
419
|
-
height: 1.6%;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
#splash-screen h3 {
|
|
423
|
-
margin: 11px 0 0 0;
|
|
424
|
-
color: #333;
|
|
425
|
-
font-size: 18px;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
#splash-screen h4 {
|
|
429
|
-
color: #333;
|
|
430
|
-
font-size: 17px;
|
|
431
|
-
margin: 11px 0 0 0;
|
|
432
|
-
}
|
|
433
365
|
|
|
434
366
|
#file-selection-btn.inline-btn {
|
|
435
367
|
padding: 2px 4px 3px 3px;
|
|
@@ -509,7 +441,7 @@ body.dragover #import-options-drop-area .drop-area {
|
|
|
509
441
|
}
|
|
510
442
|
|
|
511
443
|
.dropped-file-list {
|
|
512
|
-
margin-bottom:
|
|
444
|
+
margin-bottom: 4px;
|
|
513
445
|
max-height: 300px;
|
|
514
446
|
overflow-y: auto;
|
|
515
447
|
}
|
|
@@ -532,6 +464,19 @@ body.dragover #import-options-drop-area .drop-area {
|
|
|
532
464
|
margin-right: 16px;
|
|
533
465
|
}
|
|
534
466
|
|
|
467
|
+
#import-options .queued-file-section {
|
|
468
|
+
display: none;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.queued-files #import-options .queued-file-section {
|
|
472
|
+
margin-top: 10px;
|
|
473
|
+
display: block;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.queued-files #import-options .import-instructions {
|
|
477
|
+
display: none;
|
|
478
|
+
}
|
|
479
|
+
|
|
535
480
|
|
|
536
481
|
#import-options .dropped-file-list p {
|
|
537
482
|
line-height: 1;
|
|
@@ -546,14 +491,24 @@ body.dragover #import-options-drop-area .drop-area {
|
|
|
546
491
|
text-align: center;
|
|
547
492
|
}
|
|
548
493
|
|
|
549
|
-
.info-box,.popup
|
|
494
|
+
.info-box,.popup {
|
|
550
495
|
border-radius: 9px;
|
|
551
|
-
border: 1px solid #
|
|
552
|
-
box-shadow: 0
|
|
553
|
-
box-shadow: 0 1px 7px rgba(0,0,0,0.15);
|
|
496
|
+
border: 1px solid #d5d5d5;
|
|
497
|
+
box-shadow: 0 1px 7px rgba(0,0,0,0.18);
|
|
554
498
|
background-color: #fff;
|
|
555
499
|
}
|
|
556
500
|
|
|
501
|
+
.contextmenu {
|
|
502
|
+
position: absolute;
|
|
503
|
+
border-radius: 6px;
|
|
504
|
+
border: 1px solid #d5d5d5;
|
|
505
|
+
box-shadow: 0 1px 7px rgba(0,0,0,0.18);
|
|
506
|
+
background-color: #fff;
|
|
507
|
+
font-size: 13px;
|
|
508
|
+
z-index: 40;
|
|
509
|
+
padding: 4px 0;
|
|
510
|
+
}
|
|
511
|
+
|
|
557
512
|
.contextmenu-item {
|
|
558
513
|
padding: 6px;
|
|
559
514
|
}
|
|
@@ -605,7 +560,7 @@ body.dragover #import-options-drop-area .drop-area {
|
|
|
605
560
|
.info-box h4 {
|
|
606
561
|
font-size: 1.085em;
|
|
607
562
|
font-weight: normal;
|
|
608
|
-
margin:
|
|
563
|
+
margin: 4px 0 2px 0;
|
|
609
564
|
}
|
|
610
565
|
|
|
611
566
|
.info-box p {
|
|
@@ -827,6 +782,11 @@ body.simplify .layer-control-btn {
|
|
|
827
782
|
z-index: 90;
|
|
828
783
|
}
|
|
829
784
|
|
|
785
|
+
.layer-control .no-layer-note {
|
|
786
|
+
color: #777;
|
|
787
|
+
margin: 4px 0 6px 0;
|
|
788
|
+
}
|
|
789
|
+
|
|
830
790
|
.layer-menu .layer-list {
|
|
831
791
|
margin: 6px 0 7px 0;
|
|
832
792
|
}
|
|
@@ -868,7 +828,7 @@ img.close-btn {
|
|
|
868
828
|
|
|
869
829
|
.close2-btn {
|
|
870
830
|
display: inline-block;
|
|
871
|
-
background-color: #
|
|
831
|
+
background-color: #e5e5e5;
|
|
872
832
|
background-image: url("images/close2.png");
|
|
873
833
|
background-size: cover;
|
|
874
834
|
float: right;
|
|
@@ -1044,13 +1004,6 @@ img.close-btn:hover,
|
|
|
1044
1004
|
}*/
|
|
1045
1005
|
|
|
1046
1006
|
|
|
1047
|
-
.contextmenu {
|
|
1048
|
-
font-size: 13px;
|
|
1049
|
-
position: absolute;
|
|
1050
|
-
z-index: 40;
|
|
1051
|
-
padding: 5px 0;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
1007
|
/* --- Popup -------------------- */
|
|
1055
1008
|
|
|
1056
1009
|
.popup {
|
|
@@ -1354,7 +1307,6 @@ div.basemap-style-btn.active img {
|
|
|
1354
1307
|
white-space: nowrap;
|
|
1355
1308
|
border-radius: 6px;
|
|
1356
1309
|
border: 1px solid #ddd;
|
|
1357
|
-
box-shadow: 0 2px 5px rgba(0,0,0,0.35);
|
|
1358
1310
|
box-shadow: 0 1px 7px rgba(0,0,0,0.12);
|
|
1359
1311
|
}
|
|
1360
1312
|
|
|
@@ -1397,7 +1349,7 @@ div.basemap-style-btn.active img {
|
|
|
1397
1349
|
.contextmenu-item {
|
|
1398
1350
|
background-color: #fff;
|
|
1399
1351
|
white-space: nowrap;
|
|
1400
|
-
padding: 6px
|
|
1352
|
+
padding: 6px 10px 7px 10px;
|
|
1401
1353
|
line-height: 11px;
|
|
1402
1354
|
cursor: pointer;
|
|
1403
1355
|
}
|