@dartcom/ui-kit 3.6.0 → 3.6.1
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/dist/index.cjs
CHANGED
|
@@ -44179,6 +44179,1224 @@ const LeafletLayer = () => {
|
|
|
44179
44179
|
return null;
|
|
44180
44180
|
};
|
|
44181
44181
|
|
|
44182
|
+
const getBuiltupAreaLayers = (source) => {
|
|
44183
|
+
const layers = [];
|
|
44184
|
+
const data = {
|
|
44185
|
+
source,
|
|
44186
|
+
layer: '"MapAdminBuiltupArea"',
|
|
44187
|
+
};
|
|
44188
|
+
const layer = {
|
|
44189
|
+
id: uuid(),
|
|
44190
|
+
data,
|
|
44191
|
+
draw: {
|
|
44192
|
+
polygons: {
|
|
44193
|
+
color: '#CFC8C8',
|
|
44194
|
+
},
|
|
44195
|
+
},
|
|
44196
|
+
};
|
|
44197
|
+
layers.push(layer);
|
|
44198
|
+
return layers;
|
|
44199
|
+
};
|
|
44200
|
+
|
|
44201
|
+
const getPointAddressLayers = (source) => {
|
|
44202
|
+
const layer = {
|
|
44203
|
+
id: uuid(),
|
|
44204
|
+
data: {
|
|
44205
|
+
source,
|
|
44206
|
+
layer: '"PointAddress"',
|
|
44207
|
+
minzoom: 15,
|
|
44208
|
+
},
|
|
44209
|
+
draw: {
|
|
44210
|
+
text: {
|
|
44211
|
+
interactive: true,
|
|
44212
|
+
text_source: 'address',
|
|
44213
|
+
font: {
|
|
44214
|
+
fill: 'black',
|
|
44215
|
+
size: '12px',
|
|
44216
|
+
},
|
|
44217
|
+
},
|
|
44218
|
+
},
|
|
44219
|
+
};
|
|
44220
|
+
return [layer];
|
|
44221
|
+
};
|
|
44222
|
+
|
|
44223
|
+
const text_source = `function() {
|
|
44224
|
+
const { poi_name, cat_id } = feature;
|
|
44225
|
+
|
|
44226
|
+
switch (+cat_id) {
|
|
44227
|
+
case 4100: {
|
|
44228
|
+
const text = poi_name.replaceAll(/(Метро-|Станция-|МЦД-)/g, "");
|
|
44229
|
+
|
|
44230
|
+
return text;
|
|
44231
|
+
}
|
|
44232
|
+
|
|
44233
|
+
default: {
|
|
44234
|
+
return poi_name;
|
|
44235
|
+
}
|
|
44236
|
+
}
|
|
44237
|
+
}`;
|
|
44238
|
+
const catIds = [
|
|
44239
|
+
3578, 4013, 4100, 5400, 5511, 5512, 5540, 5541, 5800, 5813, 5999, 6000, 7011,
|
|
44240
|
+
7389, 7832, 7929, 7990, 8060, 8410, 9517, 9530, 9565, 9583, 9718, 9992,
|
|
44241
|
+
];
|
|
44242
|
+
|
|
44243
|
+
const getDefaultPOI = (cat_id) => {
|
|
44244
|
+
const defaultPOI = {};
|
|
44245
|
+
switch (cat_id) {
|
|
44246
|
+
case 4100: {
|
|
44247
|
+
defaultPOI[`_${cat_id}-metro`] = {
|
|
44248
|
+
filter: `function() {
|
|
44249
|
+
const { poi_name, cat_id } = feature;
|
|
44250
|
+
|
|
44251
|
+
const isMetro = poi_name.startsWith('Метро-');
|
|
44252
|
+
const isStation = poi_name.startsWith('Станция-');
|
|
44253
|
+
|
|
44254
|
+
const isCatId = +cat_id === ${cat_id};
|
|
44255
|
+
|
|
44256
|
+
const isFilter = isCatId && (isMetro || isStation);
|
|
44257
|
+
|
|
44258
|
+
return isFilter;
|
|
44259
|
+
}`,
|
|
44260
|
+
draw: {
|
|
44261
|
+
points: getPOITypeLayer(`POI_${cat_id}(metro)`),
|
|
44262
|
+
},
|
|
44263
|
+
};
|
|
44264
|
+
defaultPOI[`_${cat_id}-diameter`] = {
|
|
44265
|
+
filter: `function() {
|
|
44266
|
+
const { cat_id, poi_name } = feature;
|
|
44267
|
+
|
|
44268
|
+
const isDiameter = poi_name.startsWith('МЦД-');
|
|
44269
|
+
|
|
44270
|
+
const isCatId = +cat_id === ${cat_id};
|
|
44271
|
+
|
|
44272
|
+
const isFilter = isCatId && isDiameter;
|
|
44273
|
+
|
|
44274
|
+
return isFilter;
|
|
44275
|
+
}`,
|
|
44276
|
+
draw: {
|
|
44277
|
+
points: getPOITypeLayer(`POI_${cat_id}(diameter)`),
|
|
44278
|
+
},
|
|
44279
|
+
};
|
|
44280
|
+
break;
|
|
44281
|
+
}
|
|
44282
|
+
case 9530: {
|
|
44283
|
+
defaultPOI[`_${cat_id}-mail`] = {
|
|
44284
|
+
filter: `function() {
|
|
44285
|
+
const { cat_id, poi_name = '' } = feature;
|
|
44286
|
+
|
|
44287
|
+
const isCatId = +cat_id === ${cat_id};
|
|
44288
|
+
|
|
44289
|
+
const isMail = poi_name.startsWith('Почта');
|
|
44290
|
+
|
|
44291
|
+
const isFilter = isCatId && isMail;
|
|
44292
|
+
|
|
44293
|
+
return isFilter;
|
|
44294
|
+
}`,
|
|
44295
|
+
draw: {
|
|
44296
|
+
points: getPOITypeLayer(`POI_${cat_id}(Mail)`),
|
|
44297
|
+
},
|
|
44298
|
+
};
|
|
44299
|
+
defaultPOI[`_${cat_id}-delivery`] = {
|
|
44300
|
+
filter: `function() {
|
|
44301
|
+
const { cat_id, poi_name = '' } = feature;
|
|
44302
|
+
|
|
44303
|
+
const isCatId = +cat_id === ${cat_id};
|
|
44304
|
+
|
|
44305
|
+
const isMail = poi_name.startsWith('Почта');
|
|
44306
|
+
|
|
44307
|
+
const isFilter = isCatId && !isMail;
|
|
44308
|
+
|
|
44309
|
+
return isFilter;
|
|
44310
|
+
}`,
|
|
44311
|
+
draw: {
|
|
44312
|
+
points: getPOITypeLayer(`POI_${cat_id}(Delivery)`),
|
|
44313
|
+
},
|
|
44314
|
+
};
|
|
44315
|
+
break;
|
|
44316
|
+
}
|
|
44317
|
+
case 9992: {
|
|
44318
|
+
const subcat = {
|
|
44319
|
+
mosque: 1,
|
|
44320
|
+
church: 2,
|
|
44321
|
+
temple: 3,
|
|
44322
|
+
davidStar: 4,
|
|
44323
|
+
mortar: 6,
|
|
44324
|
+
};
|
|
44325
|
+
Object.entries(subcat).forEach(([subcat_name, subcat_id]) => {
|
|
44326
|
+
defaultPOI[`_${cat_id}-${subcat_name}`] = {
|
|
44327
|
+
filter: `function() {
|
|
44328
|
+
const { cat_id, subcat_id } = feature;
|
|
44329
|
+
|
|
44330
|
+
const isCatId = +cat_id === ${cat_id};
|
|
44331
|
+
const isSubcatId = +subcat_id === ${subcat_id};
|
|
44332
|
+
|
|
44333
|
+
const isFilter = isCatId && isSubcatId;
|
|
44334
|
+
|
|
44335
|
+
return isFilter;
|
|
44336
|
+
}`,
|
|
44337
|
+
draw: {
|
|
44338
|
+
points: getPOITypeLayer(`POI_${cat_id}(${subcat_name})`),
|
|
44339
|
+
},
|
|
44340
|
+
};
|
|
44341
|
+
});
|
|
44342
|
+
break;
|
|
44343
|
+
}
|
|
44344
|
+
default: {
|
|
44345
|
+
defaultPOI[`_${cat_id}`] = {
|
|
44346
|
+
filter: `function {
|
|
44347
|
+
const { cat_id } = feature;
|
|
44348
|
+
|
|
44349
|
+
const isFilter = +cat_id === ${cat_id};
|
|
44350
|
+
|
|
44351
|
+
return isFilter;
|
|
44352
|
+
}`,
|
|
44353
|
+
draw: {
|
|
44354
|
+
points: getPOITypeLayer(`POI_${cat_id}`),
|
|
44355
|
+
},
|
|
44356
|
+
};
|
|
44357
|
+
}
|
|
44358
|
+
}
|
|
44359
|
+
return defaultPOI;
|
|
44360
|
+
};
|
|
44361
|
+
const getPOITypeLayer = (texture) => {
|
|
44362
|
+
const typeLayer = {
|
|
44363
|
+
texture,
|
|
44364
|
+
sprite: 'base',
|
|
44365
|
+
size: '20px',
|
|
44366
|
+
placement: 'midpoint',
|
|
44367
|
+
};
|
|
44368
|
+
return typeLayer;
|
|
44369
|
+
};
|
|
44370
|
+
const sublayers = catIds.reduce((acc, catId) => ({
|
|
44371
|
+
...acc,
|
|
44372
|
+
...getDefaultPOI(catId),
|
|
44373
|
+
}), {});
|
|
44374
|
+
const getPOILayers = (source) => {
|
|
44375
|
+
const layers = [];
|
|
44376
|
+
const layer = {
|
|
44377
|
+
id: uuid(),
|
|
44378
|
+
data: {
|
|
44379
|
+
source,
|
|
44380
|
+
layer: '"POI"',
|
|
44381
|
+
},
|
|
44382
|
+
draw: {
|
|
44383
|
+
points: {
|
|
44384
|
+
text: {
|
|
44385
|
+
text_source,
|
|
44386
|
+
font: {
|
|
44387
|
+
fill: '#464544',
|
|
44388
|
+
size: '12px',
|
|
44389
|
+
},
|
|
44390
|
+
},
|
|
44391
|
+
},
|
|
44392
|
+
},
|
|
44393
|
+
sublayers,
|
|
44394
|
+
};
|
|
44395
|
+
layers.push(layer);
|
|
44396
|
+
return layers;
|
|
44397
|
+
};
|
|
44398
|
+
|
|
44399
|
+
const getCityPOILayers = (source) => {
|
|
44400
|
+
const layer = {
|
|
44401
|
+
id: uuid(),
|
|
44402
|
+
data: {
|
|
44403
|
+
source,
|
|
44404
|
+
layer: '"CityPOI"',
|
|
44405
|
+
},
|
|
44406
|
+
filter: `function () {
|
|
44407
|
+
const { capital_order8, capital_order2, capital_order1, poi_name, priority } = feature;
|
|
44408
|
+
|
|
44409
|
+
if ($zoom >= 9 && $zoom < 13) {
|
|
44410
|
+
return priority < 8;
|
|
44411
|
+
}
|
|
44412
|
+
|
|
44413
|
+
if ($zoom <= 11) {
|
|
44414
|
+
return capital_order8 === 'Y';
|
|
44415
|
+
}
|
|
44416
|
+
|
|
44417
|
+
if ($zoom >= 15) {
|
|
44418
|
+
return capital_order2 !== 'Y';
|
|
44419
|
+
}
|
|
44420
|
+
|
|
44421
|
+
return true;
|
|
44422
|
+
}
|
|
44423
|
+
`,
|
|
44424
|
+
draw: {
|
|
44425
|
+
text: {
|
|
44426
|
+
text_source: 'poi_name',
|
|
44427
|
+
priority: `function () {
|
|
44428
|
+
const { priority } = feature;
|
|
44429
|
+
|
|
44430
|
+
if ($zoom <= 15) {
|
|
44431
|
+
return priority;
|
|
44432
|
+
}
|
|
44433
|
+
|
|
44434
|
+
return 1;
|
|
44435
|
+
}
|
|
44436
|
+
`,
|
|
44437
|
+
font: {
|
|
44438
|
+
fill: 'black',
|
|
44439
|
+
size: `function() {
|
|
44440
|
+
const { capital_order8 } = feature;
|
|
44441
|
+
|
|
44442
|
+
if (capital_order8 === 'Y') {
|
|
44443
|
+
return '16px';
|
|
44444
|
+
}
|
|
44445
|
+
|
|
44446
|
+
return '12px';
|
|
44447
|
+
}`,
|
|
44448
|
+
weight: `function() {
|
|
44449
|
+
const { capital_order2 } = feature;
|
|
44450
|
+
|
|
44451
|
+
if (capital_order2 === 'Y') {
|
|
44452
|
+
return 'bold';
|
|
44453
|
+
}
|
|
44454
|
+
|
|
44455
|
+
return 'normal';
|
|
44456
|
+
}`,
|
|
44457
|
+
stroke: {
|
|
44458
|
+
color: 'white',
|
|
44459
|
+
width: '2px',
|
|
44460
|
+
},
|
|
44461
|
+
},
|
|
44462
|
+
},
|
|
44463
|
+
},
|
|
44464
|
+
};
|
|
44465
|
+
return [layer];
|
|
44466
|
+
};
|
|
44467
|
+
|
|
44468
|
+
const getOneWayLayers = (source) => {
|
|
44469
|
+
const layer = {
|
|
44470
|
+
id: uuid(),
|
|
44471
|
+
data: {
|
|
44472
|
+
source,
|
|
44473
|
+
layer: '"OneWay"',
|
|
44474
|
+
},
|
|
44475
|
+
draw: {
|
|
44476
|
+
points: {
|
|
44477
|
+
texture: 'arrow',
|
|
44478
|
+
sprite: 'base',
|
|
44479
|
+
angle: `function() {
|
|
44480
|
+
const { bearing } = feature;
|
|
44481
|
+
|
|
44482
|
+
return bearing;
|
|
44483
|
+
}
|
|
44484
|
+
`,
|
|
44485
|
+
},
|
|
44486
|
+
},
|
|
44487
|
+
};
|
|
44488
|
+
return [layer];
|
|
44489
|
+
};
|
|
44490
|
+
|
|
44491
|
+
var ConditionTypes;
|
|
44492
|
+
(function (ConditionTypes) {
|
|
44493
|
+
ConditionTypes["traffic_signal"] = "traffic_signal";
|
|
44494
|
+
ConditionTypes["pedestrian_crossing"] = "pedestrian_crossing";
|
|
44495
|
+
ConditionTypes["physical"] = "physical";
|
|
44496
|
+
ConditionTypes["gate"] = "gate";
|
|
44497
|
+
})(ConditionTypes || (ConditionTypes = {}));
|
|
44498
|
+
|
|
44499
|
+
const getConditionLayers = (source) => {
|
|
44500
|
+
const sublayers = {};
|
|
44501
|
+
const layer = {
|
|
44502
|
+
id: uuid(),
|
|
44503
|
+
data: {
|
|
44504
|
+
source,
|
|
44505
|
+
layer: '"Conditions"',
|
|
44506
|
+
},
|
|
44507
|
+
};
|
|
44508
|
+
Object.values(ConditionTypes).forEach((conditionType) => {
|
|
44509
|
+
sublayers[`_${conditionType}`] = {
|
|
44510
|
+
filter: `function() {
|
|
44511
|
+
const { type } = feature;
|
|
44512
|
+
|
|
44513
|
+
const isShow = type === '${conditionType}';
|
|
44514
|
+
|
|
44515
|
+
return isShow;
|
|
44516
|
+
}`,
|
|
44517
|
+
draw: {
|
|
44518
|
+
points: {
|
|
44519
|
+
texture: conditionType,
|
|
44520
|
+
sprite: 'base',
|
|
44521
|
+
placement: 'midpoint',
|
|
44522
|
+
},
|
|
44523
|
+
},
|
|
44524
|
+
};
|
|
44525
|
+
});
|
|
44526
|
+
layer.sublayers = sublayers;
|
|
44527
|
+
return [layer];
|
|
44528
|
+
};
|
|
44529
|
+
|
|
44530
|
+
const getRailroadLayers = (source) => {
|
|
44531
|
+
const layer = '"MapRailroadLink"';
|
|
44532
|
+
const layers = [];
|
|
44533
|
+
const data = {
|
|
44534
|
+
source,
|
|
44535
|
+
layer,
|
|
44536
|
+
};
|
|
44537
|
+
const frontLayer = {
|
|
44538
|
+
id: uuid(),
|
|
44539
|
+
data: {
|
|
44540
|
+
source,
|
|
44541
|
+
layer,
|
|
44542
|
+
},
|
|
44543
|
+
draw: {
|
|
44544
|
+
lines: {
|
|
44545
|
+
width: 5,
|
|
44546
|
+
dash: [2, 1],
|
|
44547
|
+
color: '#5C5F5F',
|
|
44548
|
+
cap: 'round',
|
|
44549
|
+
join: 'round',
|
|
44550
|
+
},
|
|
44551
|
+
},
|
|
44552
|
+
};
|
|
44553
|
+
const backLayer = {
|
|
44554
|
+
id: uuid(),
|
|
44555
|
+
data,
|
|
44556
|
+
draw: {
|
|
44557
|
+
lines: {
|
|
44558
|
+
width: 6,
|
|
44559
|
+
color: '#A3A8A',
|
|
44560
|
+
cap: 'round',
|
|
44561
|
+
join: 'round',
|
|
44562
|
+
},
|
|
44563
|
+
},
|
|
44564
|
+
};
|
|
44565
|
+
layers.push(backLayer, frontLayer);
|
|
44566
|
+
return layers;
|
|
44567
|
+
};
|
|
44568
|
+
|
|
44569
|
+
const getWaterAreaLayers = (source) => {
|
|
44570
|
+
const layers = [];
|
|
44571
|
+
const layer = {
|
|
44572
|
+
id: uuid(),
|
|
44573
|
+
data: {
|
|
44574
|
+
source,
|
|
44575
|
+
layer: '"MapWaterArea"',
|
|
44576
|
+
},
|
|
44577
|
+
draw: {
|
|
44578
|
+
polygons: {
|
|
44579
|
+
color: '#7DBEE4',
|
|
44580
|
+
},
|
|
44581
|
+
lines: {
|
|
44582
|
+
color: '#7DBEE4',
|
|
44583
|
+
width: 20,
|
|
44584
|
+
cap: 'round',
|
|
44585
|
+
join: 'round',
|
|
44586
|
+
},
|
|
44587
|
+
},
|
|
44588
|
+
};
|
|
44589
|
+
const waterAreaLabelLayer = {
|
|
44590
|
+
id: uuid(),
|
|
44591
|
+
data: {
|
|
44592
|
+
source,
|
|
44593
|
+
layer: '"MapWaterAreaLabel"',
|
|
44594
|
+
},
|
|
44595
|
+
filter: `function() {
|
|
44596
|
+
const { display_class } = feature;
|
|
44597
|
+
|
|
44598
|
+
if ($zoom >= 14) {
|
|
44599
|
+
return true;
|
|
44600
|
+
} else {
|
|
44601
|
+
return display_class <= 4;
|
|
44602
|
+
}
|
|
44603
|
+
}`,
|
|
44604
|
+
draw: {
|
|
44605
|
+
text: {
|
|
44606
|
+
text_source: 'name',
|
|
44607
|
+
font: {
|
|
44608
|
+
fill: '#0A80C4',
|
|
44609
|
+
size: '14px',
|
|
44610
|
+
stroke: { color: 'white', width: '3px' },
|
|
44611
|
+
},
|
|
44612
|
+
},
|
|
44613
|
+
},
|
|
44614
|
+
};
|
|
44615
|
+
const waterLakeLabelLayer = {
|
|
44616
|
+
id: uuid(),
|
|
44617
|
+
data: {
|
|
44618
|
+
source,
|
|
44619
|
+
layer: '"MapWaterLakeLabel"',
|
|
44620
|
+
},
|
|
44621
|
+
filter: `function() {
|
|
44622
|
+
const { display_class } = feature;
|
|
44623
|
+
|
|
44624
|
+
if ($zoom >= 14) {
|
|
44625
|
+
return true;
|
|
44626
|
+
} else {
|
|
44627
|
+
return display_class <= 4;
|
|
44628
|
+
}
|
|
44629
|
+
}`,
|
|
44630
|
+
draw: {
|
|
44631
|
+
text: {
|
|
44632
|
+
text_source: 'name',
|
|
44633
|
+
font: {
|
|
44634
|
+
fill: '#0A80C4',
|
|
44635
|
+
size: '14px',
|
|
44636
|
+
stroke: { color: 'white', width: '3px' },
|
|
44637
|
+
},
|
|
44638
|
+
},
|
|
44639
|
+
},
|
|
44640
|
+
};
|
|
44641
|
+
layers.push(layer, waterAreaLabelLayer, waterLakeLabelLayer);
|
|
44642
|
+
return layers;
|
|
44643
|
+
};
|
|
44644
|
+
|
|
44645
|
+
const getWaterLinkLayers = (source) => {
|
|
44646
|
+
const sublayers = {};
|
|
44647
|
+
const layer = {
|
|
44648
|
+
id: uuid(),
|
|
44649
|
+
data: {
|
|
44650
|
+
source,
|
|
44651
|
+
layer: '"MapWaterLink"',
|
|
44652
|
+
},
|
|
44653
|
+
};
|
|
44654
|
+
sublayers.geometry = {
|
|
44655
|
+
draw: {
|
|
44656
|
+
lines: {
|
|
44657
|
+
color: '#7DBEE4',
|
|
44658
|
+
width: 5,
|
|
44659
|
+
cap: 'round',
|
|
44660
|
+
join: 'round',
|
|
44661
|
+
},
|
|
44662
|
+
},
|
|
44663
|
+
};
|
|
44664
|
+
sublayers.text = {
|
|
44665
|
+
filter: `function() {
|
|
44666
|
+
return $zoom >= 10;
|
|
44667
|
+
}`,
|
|
44668
|
+
draw: {
|
|
44669
|
+
text: {
|
|
44670
|
+
text_source: 'name',
|
|
44671
|
+
font: {
|
|
44672
|
+
fill: '#0A80C4',
|
|
44673
|
+
size: '14px',
|
|
44674
|
+
stroke: { color: 'white', width: '3px' },
|
|
44675
|
+
},
|
|
44676
|
+
},
|
|
44677
|
+
},
|
|
44678
|
+
};
|
|
44679
|
+
layer.sublayers = sublayers;
|
|
44680
|
+
return [layer];
|
|
44681
|
+
};
|
|
44682
|
+
|
|
44683
|
+
const getOceanAreaLayers = (source) => {
|
|
44684
|
+
const geometryLayer = {
|
|
44685
|
+
id: uuid(),
|
|
44686
|
+
data: {
|
|
44687
|
+
source,
|
|
44688
|
+
layer: '"MapOceanArea"',
|
|
44689
|
+
},
|
|
44690
|
+
draw: {
|
|
44691
|
+
polygons: {
|
|
44692
|
+
color: '#7DBEE4',
|
|
44693
|
+
},
|
|
44694
|
+
},
|
|
44695
|
+
};
|
|
44696
|
+
const textLayer = {
|
|
44697
|
+
id: uuid(),
|
|
44698
|
+
data: {
|
|
44699
|
+
source,
|
|
44700
|
+
layer: '"MapOceanAreaLabel"',
|
|
44701
|
+
},
|
|
44702
|
+
draw: {
|
|
44703
|
+
text: {
|
|
44704
|
+
text_source: 'name',
|
|
44705
|
+
font: {
|
|
44706
|
+
fill: '#0A80C4',
|
|
44707
|
+
size: '18px',
|
|
44708
|
+
stroke: { color: 'white', width: '3px' },
|
|
44709
|
+
},
|
|
44710
|
+
},
|
|
44711
|
+
},
|
|
44712
|
+
};
|
|
44713
|
+
return [geometryLayer, textLayer];
|
|
44714
|
+
};
|
|
44715
|
+
|
|
44716
|
+
const getLanduseAreaLayers = (source) => {
|
|
44717
|
+
const layers = [];
|
|
44718
|
+
switch (source) {
|
|
44719
|
+
case exports.TangramSourceNames.NATURE_TILE: {
|
|
44720
|
+
const geometryLayer = {
|
|
44721
|
+
id: uuid(),
|
|
44722
|
+
data: {
|
|
44723
|
+
source,
|
|
44724
|
+
layer: '"MapNatureForest"',
|
|
44725
|
+
},
|
|
44726
|
+
draw: {
|
|
44727
|
+
polygons: {
|
|
44728
|
+
interactive: true,
|
|
44729
|
+
color: `function() {
|
|
44730
|
+
const { feature_type } = feature;
|
|
44731
|
+
|
|
44732
|
+
switch (feature_type) {
|
|
44733
|
+
case '900202': {
|
|
44734
|
+
return '#96BE7D';
|
|
44735
|
+
}
|
|
44736
|
+
|
|
44737
|
+
default : {
|
|
44738
|
+
return null;
|
|
44739
|
+
}
|
|
44740
|
+
}
|
|
44741
|
+
}`,
|
|
44742
|
+
},
|
|
44743
|
+
},
|
|
44744
|
+
};
|
|
44745
|
+
layers.push(geometryLayer);
|
|
44746
|
+
break;
|
|
44747
|
+
}
|
|
44748
|
+
default: {
|
|
44749
|
+
const geometryLayer = {
|
|
44750
|
+
id: uuid(),
|
|
44751
|
+
data: {
|
|
44752
|
+
source,
|
|
44753
|
+
layer: '"MapLanduseArea"',
|
|
44754
|
+
},
|
|
44755
|
+
draw: {
|
|
44756
|
+
polygons: {
|
|
44757
|
+
interactive: true,
|
|
44758
|
+
color: `function() {
|
|
44759
|
+
const { feature_type } = feature;
|
|
44760
|
+
|
|
44761
|
+
switch (feature_type) {
|
|
44762
|
+
case '509998': {
|
|
44763
|
+
return '#ECD175';
|
|
44764
|
+
}
|
|
44765
|
+
|
|
44766
|
+
case '600102':
|
|
44767
|
+
case '900140': {
|
|
44768
|
+
return '#3E9A8C';
|
|
44769
|
+
}
|
|
44770
|
+
|
|
44771
|
+
case '900202':
|
|
44772
|
+
case '900130':
|
|
44773
|
+
case '900150':
|
|
44774
|
+
case '900103': {
|
|
44775
|
+
return '#96BE7D';
|
|
44776
|
+
}
|
|
44777
|
+
|
|
44778
|
+
case '9997010': {
|
|
44779
|
+
return null;
|
|
44780
|
+
}
|
|
44781
|
+
}
|
|
44782
|
+
}`,
|
|
44783
|
+
order: `function() {
|
|
44784
|
+
const { feature_type } = feature;
|
|
44785
|
+
|
|
44786
|
+
switch(feature_type) {
|
|
44787
|
+
case '900150':
|
|
44788
|
+
case '900130':
|
|
44789
|
+
case '509998': {
|
|
44790
|
+
return 300;
|
|
44791
|
+
}
|
|
44792
|
+
|
|
44793
|
+
default: {
|
|
44794
|
+
return 299;
|
|
44795
|
+
}
|
|
44796
|
+
}
|
|
44797
|
+
}`,
|
|
44798
|
+
},
|
|
44799
|
+
},
|
|
44800
|
+
};
|
|
44801
|
+
const labelLayer = {
|
|
44802
|
+
id: uuid(),
|
|
44803
|
+
data: {
|
|
44804
|
+
source,
|
|
44805
|
+
layer: '"MapLanduseAreaLabel"',
|
|
44806
|
+
},
|
|
44807
|
+
filter: `function() {
|
|
44808
|
+
return $zoom >= 15;
|
|
44809
|
+
}`,
|
|
44810
|
+
draw: {
|
|
44811
|
+
text: {
|
|
44812
|
+
text_source: 'name',
|
|
44813
|
+
font: {
|
|
44814
|
+
size: '13px',
|
|
44815
|
+
fill: `function() {
|
|
44816
|
+
const { feature_type } = feature;
|
|
44817
|
+
|
|
44818
|
+
switch(feature_type) {
|
|
44819
|
+
case '509998': {
|
|
44820
|
+
return '#CD7F32';
|
|
44821
|
+
}
|
|
44822
|
+
|
|
44823
|
+
default: {
|
|
44824
|
+
return '#00541F';
|
|
44825
|
+
}
|
|
44826
|
+
}
|
|
44827
|
+
}`,
|
|
44828
|
+
stroke: { color: 'white', width: '3px' },
|
|
44829
|
+
},
|
|
44830
|
+
},
|
|
44831
|
+
},
|
|
44832
|
+
};
|
|
44833
|
+
layers.push(geometryLayer, labelLayer);
|
|
44834
|
+
}
|
|
44835
|
+
}
|
|
44836
|
+
return layers;
|
|
44837
|
+
};
|
|
44838
|
+
|
|
44839
|
+
const getBuildingLayers = (source) => {
|
|
44840
|
+
const layers = [];
|
|
44841
|
+
const data = {
|
|
44842
|
+
source,
|
|
44843
|
+
layer: '"MapBuildingECArea"',
|
|
44844
|
+
minzoom: 15,
|
|
44845
|
+
};
|
|
44846
|
+
const layer = {
|
|
44847
|
+
id: uuid(),
|
|
44848
|
+
data,
|
|
44849
|
+
extruded: {
|
|
44850
|
+
draw: {
|
|
44851
|
+
polygons: {
|
|
44852
|
+
interactive: true,
|
|
44853
|
+
style: 'buildings',
|
|
44854
|
+
extrude: `function() {
|
|
44855
|
+
return $zoom >= 17;
|
|
44856
|
+
}`,
|
|
44857
|
+
},
|
|
44858
|
+
},
|
|
44859
|
+
},
|
|
44860
|
+
draw: {
|
|
44861
|
+
polygons: {
|
|
44862
|
+
color: '#DDB07B',
|
|
44863
|
+
height: { property: 'height' },
|
|
44864
|
+
},
|
|
44865
|
+
lines: {
|
|
44866
|
+
color: '#DB933F',
|
|
44867
|
+
width: '2px',
|
|
44868
|
+
cap: 'round',
|
|
44869
|
+
join: 'round',
|
|
44870
|
+
},
|
|
44871
|
+
},
|
|
44872
|
+
};
|
|
44873
|
+
layers.push(layer);
|
|
44874
|
+
return layers;
|
|
44875
|
+
};
|
|
44876
|
+
|
|
44877
|
+
const getFacilityAreaLayers = (source) => {
|
|
44878
|
+
const layers = [];
|
|
44879
|
+
const geometryLayer = {
|
|
44880
|
+
id: uuid(),
|
|
44881
|
+
data: {
|
|
44882
|
+
source,
|
|
44883
|
+
layer: '"MapFacilityArea"',
|
|
44884
|
+
},
|
|
44885
|
+
draw: {
|
|
44886
|
+
polygons: {
|
|
44887
|
+
color: `function() {
|
|
44888
|
+
const { feature_type } = feature;
|
|
44889
|
+
|
|
44890
|
+
switch (feature_type) {
|
|
44891
|
+
case '2000408': {
|
|
44892
|
+
return '#DBBAC4';
|
|
44893
|
+
}
|
|
44894
|
+
|
|
44895
|
+
case '1900403': {
|
|
44896
|
+
return '#B6C3C7';
|
|
44897
|
+
}
|
|
44898
|
+
|
|
44899
|
+
case '1907403': {
|
|
44900
|
+
return '#A3B9C0';
|
|
44901
|
+
}
|
|
44902
|
+
|
|
44903
|
+
case '2000123': {
|
|
44904
|
+
return '#E4BA7D';
|
|
44905
|
+
}
|
|
44906
|
+
|
|
44907
|
+
case '2000124': {
|
|
44908
|
+
return '#BFE6E3';
|
|
44909
|
+
}
|
|
44910
|
+
|
|
44911
|
+
case '2000200': {
|
|
44912
|
+
return '#A0A9A8';
|
|
44913
|
+
}
|
|
44914
|
+
|
|
44915
|
+
case '2000403': {
|
|
44916
|
+
return '#AF7136';
|
|
44917
|
+
}
|
|
44918
|
+
|
|
44919
|
+
case '2000420': {
|
|
44920
|
+
return '#89AC76';
|
|
44921
|
+
}
|
|
44922
|
+
|
|
44923
|
+
case '2000457': {
|
|
44924
|
+
return '#9494C0';
|
|
44925
|
+
}
|
|
44926
|
+
|
|
44927
|
+
default: {
|
|
44928
|
+
return '#E1D4D4';
|
|
44929
|
+
}
|
|
44930
|
+
}
|
|
44931
|
+
}`,
|
|
44932
|
+
order: `function() {
|
|
44933
|
+
const { feature_type } = feature;
|
|
44934
|
+
|
|
44935
|
+
switch (feature_type) {
|
|
44936
|
+
case '1907403': {
|
|
44937
|
+
return 301;
|
|
44938
|
+
}
|
|
44939
|
+
|
|
44940
|
+
default: {
|
|
44941
|
+
return 300;
|
|
44942
|
+
}
|
|
44943
|
+
}
|
|
44944
|
+
}`,
|
|
44945
|
+
},
|
|
44946
|
+
lines: {
|
|
44947
|
+
color: '#857F7F',
|
|
44948
|
+
width: '2px',
|
|
44949
|
+
cap: 'round',
|
|
44950
|
+
join: 'round',
|
|
44951
|
+
},
|
|
44952
|
+
},
|
|
44953
|
+
};
|
|
44954
|
+
const labelLayer = {
|
|
44955
|
+
id: uuid(),
|
|
44956
|
+
data: {
|
|
44957
|
+
source,
|
|
44958
|
+
layer: '"MapFacilityAreaLabel"',
|
|
44959
|
+
},
|
|
44960
|
+
draw: {
|
|
44961
|
+
text: {
|
|
44962
|
+
text_source: 'name',
|
|
44963
|
+
font: {
|
|
44964
|
+
fill: `function() {
|
|
44965
|
+
const { feature_type } = feature;
|
|
44966
|
+
|
|
44967
|
+
switch(feature_type) {
|
|
44968
|
+
case '1900403':
|
|
44969
|
+
case '1907403': {
|
|
44970
|
+
return '#256D7B';
|
|
44971
|
+
}
|
|
44972
|
+
|
|
44973
|
+
case '2000420':
|
|
44974
|
+
case '2000460':
|
|
44975
|
+
case '2000123': {
|
|
44976
|
+
return '#00541F';
|
|
44977
|
+
}
|
|
44978
|
+
|
|
44979
|
+
case '2000408': {
|
|
44980
|
+
return '#5E2129';
|
|
44981
|
+
}
|
|
44982
|
+
|
|
44983
|
+
case '2000124': {
|
|
44984
|
+
return '#3E5F8A';
|
|
44985
|
+
}
|
|
44986
|
+
|
|
44987
|
+
case '2000200': {
|
|
44988
|
+
return '#464451';
|
|
44989
|
+
}
|
|
44990
|
+
|
|
44991
|
+
case '2000403': {
|
|
44992
|
+
return '#B03F35';
|
|
44993
|
+
}
|
|
44994
|
+
|
|
44995
|
+
case '2000457': {
|
|
44996
|
+
return '#6A5ACD';
|
|
44997
|
+
}
|
|
44998
|
+
|
|
44999
|
+
case '1700215':
|
|
45000
|
+
case '900159':
|
|
45001
|
+
case '900158': {
|
|
45002
|
+
return '#474A51';
|
|
45003
|
+
}
|
|
45004
|
+
|
|
45005
|
+
default: {
|
|
45006
|
+
return black;
|
|
45007
|
+
}
|
|
45008
|
+
}
|
|
45009
|
+
}`,
|
|
45010
|
+
size: '12px',
|
|
45011
|
+
stroke: {
|
|
45012
|
+
color: 'white',
|
|
45013
|
+
width: '3px',
|
|
45014
|
+
},
|
|
45015
|
+
},
|
|
45016
|
+
},
|
|
45017
|
+
},
|
|
45018
|
+
};
|
|
45019
|
+
layers.push(geometryLayer, labelLayer);
|
|
45020
|
+
return layers;
|
|
45021
|
+
};
|
|
45022
|
+
|
|
45023
|
+
const adminAreaLayerName = '"MapAdminArea"';
|
|
45024
|
+
|
|
45025
|
+
const getAdminAreaLayers = (source) => {
|
|
45026
|
+
const layers = [];
|
|
45027
|
+
const data = {
|
|
45028
|
+
source,
|
|
45029
|
+
layer: adminAreaLayerName,
|
|
45030
|
+
};
|
|
45031
|
+
const layer = {
|
|
45032
|
+
id: uuid(),
|
|
45033
|
+
data,
|
|
45034
|
+
draw: {
|
|
45035
|
+
polygons: {
|
|
45036
|
+
color: '#D3D2CF',
|
|
45037
|
+
},
|
|
45038
|
+
},
|
|
45039
|
+
};
|
|
45040
|
+
const borderRegionLayer = {
|
|
45041
|
+
id: uuid(),
|
|
45042
|
+
data,
|
|
45043
|
+
filter: `function() {
|
|
45044
|
+
const { type } = feature;
|
|
45045
|
+
|
|
45046
|
+
const isFilter = type === 'R';
|
|
45047
|
+
|
|
45048
|
+
return isFilter;
|
|
45049
|
+
}`,
|
|
45050
|
+
draw: {
|
|
45051
|
+
lines: {
|
|
45052
|
+
color: '#696969',
|
|
45053
|
+
width: '1px',
|
|
45054
|
+
cap: 'round',
|
|
45055
|
+
join: 'round',
|
|
45056
|
+
},
|
|
45057
|
+
},
|
|
45058
|
+
};
|
|
45059
|
+
const borderDistrictLayer = {
|
|
45060
|
+
id: uuid(),
|
|
45061
|
+
data,
|
|
45062
|
+
filter: `function() {
|
|
45063
|
+
const { type } = feature;
|
|
45064
|
+
|
|
45065
|
+
const isFilter = type === 'D' && $zoom >= 12;
|
|
45066
|
+
|
|
45067
|
+
return isFilter;
|
|
45068
|
+
}`,
|
|
45069
|
+
draw: {
|
|
45070
|
+
lines: {
|
|
45071
|
+
color: '#696969',
|
|
45072
|
+
dash: [4, 7],
|
|
45073
|
+
width: '1px',
|
|
45074
|
+
cap: 'round',
|
|
45075
|
+
join: 'round',
|
|
45076
|
+
},
|
|
45077
|
+
},
|
|
45078
|
+
};
|
|
45079
|
+
layers.push(layer, borderRegionLayer, borderDistrictLayer);
|
|
45080
|
+
return layers;
|
|
45081
|
+
};
|
|
45082
|
+
|
|
45083
|
+
const getNatureFieldLayers = (source) => {
|
|
45084
|
+
const layer = {
|
|
45085
|
+
id: uuid(),
|
|
45086
|
+
data: {
|
|
45087
|
+
source,
|
|
45088
|
+
layer: '"MapNatureField"',
|
|
45089
|
+
},
|
|
45090
|
+
draw: {
|
|
45091
|
+
polygons: {
|
|
45092
|
+
interactive: true,
|
|
45093
|
+
color: '#EBEEC7',
|
|
45094
|
+
},
|
|
45095
|
+
},
|
|
45096
|
+
};
|
|
45097
|
+
return [layer];
|
|
45098
|
+
};
|
|
45099
|
+
|
|
45100
|
+
const linkLayerName = '"Link"';
|
|
45101
|
+
const zLvlOrders = [
|
|
45102
|
+
'2.0',
|
|
45103
|
+
'1.5',
|
|
45104
|
+
'1.0',
|
|
45105
|
+
'0.7',
|
|
45106
|
+
'0.5',
|
|
45107
|
+
'0.3',
|
|
45108
|
+
'0.0',
|
|
45109
|
+
'-0.3',
|
|
45110
|
+
'-0.5',
|
|
45111
|
+
'-0.1',
|
|
45112
|
+
];
|
|
45113
|
+
const functionInterval = [[1, 2], [3, 4], [5]];
|
|
45114
|
+
const colorFunction = `function() {
|
|
45115
|
+
const { functional_class, tunnel, tollway } = feature;
|
|
45116
|
+
|
|
45117
|
+
const alpha = tunnel ? 0.89 : 1;
|
|
45118
|
+
|
|
45119
|
+
const getRGB = (hex, alpha) => {
|
|
45120
|
+
const r = +(parseInt(hex.slice(1, 3), 16) / 255).toFixed(2);
|
|
45121
|
+
const g = +(parseInt(hex.slice(3, 5), 16) / 255).toFixed(2);
|
|
45122
|
+
const b = +(parseInt(hex.slice(5, 7), 16) / 255).toFixed(2);
|
|
45123
|
+
|
|
45124
|
+
return [r, g, b, alpha];
|
|
45125
|
+
}
|
|
45126
|
+
|
|
45127
|
+
if (tollway) {
|
|
45128
|
+
return '#D72740';
|
|
45129
|
+
}
|
|
45130
|
+
|
|
45131
|
+
switch (functional_class) {
|
|
45132
|
+
case 1:
|
|
45133
|
+
case 2: {
|
|
45134
|
+
const color = getRGB('#D1747F', alpha);
|
|
45135
|
+
|
|
45136
|
+
return color;
|
|
45137
|
+
}
|
|
45138
|
+
|
|
45139
|
+
case 3:
|
|
45140
|
+
case 4: {
|
|
45141
|
+
const color = getRGB('#B1A7AA', alpha);
|
|
45142
|
+
|
|
45143
|
+
return color;
|
|
45144
|
+
}
|
|
45145
|
+
|
|
45146
|
+
case 5: {
|
|
45147
|
+
const color = getRGB('#D5CEC3', alpha);
|
|
45148
|
+
|
|
45149
|
+
return color;
|
|
45150
|
+
}
|
|
45151
|
+
}
|
|
45152
|
+
}`;
|
|
45153
|
+
const widthFunction = `function() {
|
|
45154
|
+
const { functional_class, road_number } = feature;
|
|
45155
|
+
|
|
45156
|
+
const getScale = () => {
|
|
45157
|
+
if ($zoom <= 15 && $zoom >= 14) { return 7; }
|
|
45158
|
+
|
|
45159
|
+
if ($zoom <= 13 && $zoom >= 12) { return 9; }
|
|
45160
|
+
|
|
45161
|
+
if ($zoom <= 5) { return 400; }
|
|
45162
|
+
|
|
45163
|
+
if ($zoom <= 7) { return 200; }
|
|
45164
|
+
|
|
45165
|
+
if ($zoom < 12) { return 50; }
|
|
45166
|
+
|
|
45167
|
+
return 1;
|
|
45168
|
+
}
|
|
45169
|
+
|
|
45170
|
+
const scale = getScale();
|
|
45171
|
+
|
|
45172
|
+
switch(functional_class) {
|
|
45173
|
+
case 1:
|
|
45174
|
+
case 2: {
|
|
45175
|
+
return 8 * scale;
|
|
45176
|
+
}
|
|
45177
|
+
|
|
45178
|
+
case 3:
|
|
45179
|
+
case 4: {
|
|
45180
|
+
return 7 * scale;
|
|
45181
|
+
}
|
|
45182
|
+
|
|
45183
|
+
case 5: {
|
|
45184
|
+
if (Boolean(road_number)) {
|
|
45185
|
+
return 7 * scale;
|
|
45186
|
+
}
|
|
45187
|
+
|
|
45188
|
+
return 6;
|
|
45189
|
+
}
|
|
45190
|
+
}
|
|
45191
|
+
}`;
|
|
45192
|
+
const outlineColorFunction = `function() {
|
|
45193
|
+
const { functional_class, access_id, tollway } = feature;
|
|
45194
|
+
|
|
45195
|
+
if (tollway) {
|
|
45196
|
+
return '#B9263B';
|
|
45197
|
+
}
|
|
45198
|
+
|
|
45199
|
+
switch(functional_class) {
|
|
45200
|
+
case 5: {
|
|
45201
|
+
return '#989898';
|
|
45202
|
+
}
|
|
45203
|
+
|
|
45204
|
+
case 3:
|
|
45205
|
+
case 4: {
|
|
45206
|
+
return '#8F6E78';
|
|
45207
|
+
}
|
|
45208
|
+
|
|
45209
|
+
case 1:
|
|
45210
|
+
case 2: {
|
|
45211
|
+
return '#9A414B';
|
|
45212
|
+
}
|
|
45213
|
+
}
|
|
45214
|
+
}`;
|
|
45215
|
+
const outlineWidthFunction = `function() {
|
|
45216
|
+
const { functional_class, access_id } = feature;
|
|
45217
|
+
|
|
45218
|
+
switch(functional_class) {
|
|
45219
|
+
case 5: {
|
|
45220
|
+
switch (access_id) {
|
|
45221
|
+
case 32: {
|
|
45222
|
+
return 0;
|
|
45223
|
+
}
|
|
45224
|
+
|
|
45225
|
+
default: {
|
|
45226
|
+
return 1;
|
|
45227
|
+
}
|
|
45228
|
+
}
|
|
45229
|
+
}
|
|
45230
|
+
|
|
45231
|
+
default: {
|
|
45232
|
+
return 1;
|
|
45233
|
+
}
|
|
45234
|
+
}
|
|
45235
|
+
}`;
|
|
45236
|
+
|
|
45237
|
+
const getLinkLayers = (source) => {
|
|
45238
|
+
const layers = [];
|
|
45239
|
+
const data = {
|
|
45240
|
+
source,
|
|
45241
|
+
layer: linkLayerName,
|
|
45242
|
+
};
|
|
45243
|
+
const roadNumberLayer = {
|
|
45244
|
+
id: uuid(),
|
|
45245
|
+
data,
|
|
45246
|
+
draw: {
|
|
45247
|
+
text: {
|
|
45248
|
+
text_source: 'road_number',
|
|
45249
|
+
font: {
|
|
45250
|
+
fill: '#181bff',
|
|
45251
|
+
size: '16px',
|
|
45252
|
+
weight: 'bold',
|
|
45253
|
+
underline: true,
|
|
45254
|
+
background: {
|
|
45255
|
+
color: 'black',
|
|
45256
|
+
},
|
|
45257
|
+
},
|
|
45258
|
+
},
|
|
45259
|
+
},
|
|
45260
|
+
};
|
|
45261
|
+
layers.push(roadNumberLayer);
|
|
45262
|
+
zLvlOrders.forEach((zLvl) => {
|
|
45263
|
+
const filter = `function() {
|
|
45264
|
+
const { z_lvl = '0.0' } = feature;
|
|
45265
|
+
|
|
45266
|
+
const isFilter = z_lvl === '${zLvl}';
|
|
45267
|
+
|
|
45268
|
+
return isFilter;
|
|
45269
|
+
}`;
|
|
45270
|
+
const text = {
|
|
45271
|
+
text_source: 'street_name',
|
|
45272
|
+
font: {
|
|
45273
|
+
fill: 'black',
|
|
45274
|
+
size: '14px',
|
|
45275
|
+
stroke: { color: 'white', width: '3px' },
|
|
45276
|
+
},
|
|
45277
|
+
};
|
|
45278
|
+
const getBaseLayerDraw = () => ({
|
|
45279
|
+
text,
|
|
45280
|
+
lines: {
|
|
45281
|
+
color: colorFunction,
|
|
45282
|
+
width: widthFunction,
|
|
45283
|
+
cap: 'round',
|
|
45284
|
+
join: 'round',
|
|
45285
|
+
},
|
|
45286
|
+
});
|
|
45287
|
+
const getBorderLayerDraw = () => ({
|
|
45288
|
+
lines: {
|
|
45289
|
+
color: colorFunction,
|
|
45290
|
+
width: widthFunction,
|
|
45291
|
+
cap: 'round',
|
|
45292
|
+
join: 'round',
|
|
45293
|
+
outline: {
|
|
45294
|
+
color: outlineColorFunction,
|
|
45295
|
+
width: outlineWidthFunction,
|
|
45296
|
+
},
|
|
45297
|
+
},
|
|
45298
|
+
});
|
|
45299
|
+
switch (zLvl) {
|
|
45300
|
+
case '0.0': {
|
|
45301
|
+
functionInterval.forEach((functionClasses) => {
|
|
45302
|
+
functionClasses.forEach((functionClass) => {
|
|
45303
|
+
const baseLayer = {
|
|
45304
|
+
id: uuid(),
|
|
45305
|
+
data,
|
|
45306
|
+
filter: `function() {
|
|
45307
|
+
const { functional_class, z_lvl = '0.0' } = feature;
|
|
45308
|
+
|
|
45309
|
+
const isFilter = z_lvl === '${zLvl}' && functional_class === ${functionClass};
|
|
45310
|
+
|
|
45311
|
+
return isFilter;
|
|
45312
|
+
}`,
|
|
45313
|
+
draw: getBaseLayerDraw(),
|
|
45314
|
+
sublayers: {
|
|
45315
|
+
construction: {
|
|
45316
|
+
filter: `function() {
|
|
45317
|
+
return global.links.getIsConstruction(feature);
|
|
45318
|
+
}`,
|
|
45319
|
+
draw: {
|
|
45320
|
+
lines: {
|
|
45321
|
+
width: 3,
|
|
45322
|
+
color: '#9AA096',
|
|
45323
|
+
dash: [2, 1],
|
|
45324
|
+
},
|
|
45325
|
+
},
|
|
45326
|
+
},
|
|
45327
|
+
functionalClassAccessId32: {
|
|
45328
|
+
filter: `function() {
|
|
45329
|
+
return global.links.getIsFunctionalClass(feature);
|
|
45330
|
+
}`,
|
|
45331
|
+
draw: {
|
|
45332
|
+
lines: {
|
|
45333
|
+
width: 2,
|
|
45334
|
+
color: '#9AA096',
|
|
45335
|
+
dash: [2, 1],
|
|
45336
|
+
},
|
|
45337
|
+
},
|
|
45338
|
+
},
|
|
45339
|
+
lowMobility: {
|
|
45340
|
+
filter: `function() {
|
|
45341
|
+
return global.links.getIsLowMobility(feature);
|
|
45342
|
+
}`,
|
|
45343
|
+
draw: {
|
|
45344
|
+
lines: {
|
|
45345
|
+
width: 4,
|
|
45346
|
+
},
|
|
45347
|
+
},
|
|
45348
|
+
},
|
|
45349
|
+
},
|
|
45350
|
+
};
|
|
45351
|
+
const borderLayer = {
|
|
45352
|
+
id: uuid(),
|
|
45353
|
+
data,
|
|
45354
|
+
filter: `function() {
|
|
45355
|
+
const { functional_class, z_lvl = '0.0' } = feature;
|
|
45356
|
+
|
|
45357
|
+
const isFilter = z_lvl === '${zLvl}' && functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);
|
|
45358
|
+
|
|
45359
|
+
return isFilter;
|
|
45360
|
+
}`,
|
|
45361
|
+
draw: getBorderLayerDraw(),
|
|
45362
|
+
sublayers: {
|
|
45363
|
+
lowMobility: {
|
|
45364
|
+
filter: `function() {
|
|
45365
|
+
return global.links.getIsLowMobility(feature);
|
|
45366
|
+
}`,
|
|
45367
|
+
draw: {
|
|
45368
|
+
lines: {
|
|
45369
|
+
width: 4,
|
|
45370
|
+
},
|
|
45371
|
+
},
|
|
45372
|
+
},
|
|
45373
|
+
},
|
|
45374
|
+
};
|
|
45375
|
+
layers.push(baseLayer, borderLayer);
|
|
45376
|
+
});
|
|
45377
|
+
});
|
|
45378
|
+
break;
|
|
45379
|
+
}
|
|
45380
|
+
default: {
|
|
45381
|
+
const baseLayer = {
|
|
45382
|
+
id: uuid(),
|
|
45383
|
+
data,
|
|
45384
|
+
filter,
|
|
45385
|
+
draw: getBaseLayerDraw(),
|
|
45386
|
+
};
|
|
45387
|
+
const borderLayer = {
|
|
45388
|
+
id: uuid(),
|
|
45389
|
+
data,
|
|
45390
|
+
filter,
|
|
45391
|
+
draw: getBorderLayerDraw(),
|
|
45392
|
+
};
|
|
45393
|
+
layers.push(baseLayer, borderLayer);
|
|
45394
|
+
}
|
|
45395
|
+
}
|
|
45396
|
+
});
|
|
45397
|
+
return layers;
|
|
45398
|
+
};
|
|
45399
|
+
|
|
44182
45400
|
// define() gets called for each chunk generated by the first Rollup pass.
|
|
44183
45401
|
// The order the chunks are called in is controlled by the imports in bundle.js:
|
|
44184
45402
|
//
|
|
@@ -44246,12 +45464,32 @@ exports.NoData = NoData;
|
|
|
44246
45464
|
exports.Select = CustomSelect;
|
|
44247
45465
|
exports._backendUrl = _backendUrl;
|
|
44248
45466
|
exports._testApiKeys = _testApiKeys;
|
|
45467
|
+
exports.catIds = catIds;
|
|
45468
|
+
exports.getAdminAreaLayers = getAdminAreaLayers;
|
|
45469
|
+
exports.getBuildingLayers = getBuildingLayers;
|
|
45470
|
+
exports.getBuiltupAreaLayers = getBuiltupAreaLayers;
|
|
45471
|
+
exports.getCityPOILayers = getCityPOILayers;
|
|
45472
|
+
exports.getConditionLayers = getConditionLayers;
|
|
45473
|
+
exports.getDefaultPOI = getDefaultPOI;
|
|
45474
|
+
exports.getFacilityAreaLayers = getFacilityAreaLayers;
|
|
45475
|
+
exports.getLanduseAreaLayers = getLanduseAreaLayers;
|
|
44249
45476
|
exports.getLaneMarkingLineLayers = getLaneMarkingLineLayers;
|
|
44250
45477
|
exports.getLaneMarkingPointLayers = getLaneMarkingPointLayers;
|
|
44251
45478
|
exports.getLaneMarkingPolyLayers = getLaneMarkingPolyLayers;
|
|
45479
|
+
exports.getLinkLayers = getLinkLayers;
|
|
45480
|
+
exports.getNatureFieldLayers = getNatureFieldLayers;
|
|
45481
|
+
exports.getOceanAreaLayers = getOceanAreaLayers;
|
|
45482
|
+
exports.getOneWayLayers = getOneWayLayers;
|
|
45483
|
+
exports.getPOILayers = getPOILayers;
|
|
45484
|
+
exports.getPOITypeLayer = getPOITypeLayer;
|
|
44252
45485
|
exports.getParkingLineLayers = getParkingLineLayers;
|
|
45486
|
+
exports.getPointAddressLayers = getPointAddressLayers;
|
|
45487
|
+
exports.getRailroadLayers = getRailroadLayers;
|
|
44253
45488
|
exports.getRoadPolyLayers = getRoadPolyLayers;
|
|
45489
|
+
exports.getWaterAreaLayers = getWaterAreaLayers;
|
|
45490
|
+
exports.getWaterLinkLayers = getWaterLinkLayers;
|
|
44254
45491
|
exports.sourceUrl = sourceUrl;
|
|
45492
|
+
exports.text_source = text_source;
|
|
44255
45493
|
exports.tile_size = tile_size;
|
|
44256
45494
|
exports.useFormContext = useFormContext;
|
|
44257
45495
|
exports.useGetLeafletLayer = useGetLeafletLayer;
|