...
|
...
|
@@ -275,6 +275,16 @@ export const commonMapSettingsSchema = |
275
|
275
|
type: 'string',
|
276
|
276
|
default: 'longitude'
|
277
|
277
|
},
|
|
278
|
+ xPosKeyName: {
|
|
279
|
+ title: 'X position key name',
|
|
280
|
+ type: 'string',
|
|
281
|
+ default: 'xPos'
|
|
282
|
+ },
|
|
283
|
+ yPosKeyName: {
|
|
284
|
+ title: 'Y position key name',
|
|
285
|
+ type: 'string',
|
|
286
|
+ default: 'yPos'
|
|
287
|
+ },
|
278
|
288
|
showLabel: {
|
279
|
289
|
title: 'Show label',
|
280
|
290
|
type: 'boolean',
|
...
|
...
|
@@ -323,6 +333,21 @@ export const commonMapSettingsSchema = |
323
|
333
|
title: 'Tooltip function: f(data, dsData, dsIndex)',
|
324
|
334
|
type: 'string'
|
325
|
335
|
},
|
|
336
|
+ posFunction: {
|
|
337
|
+ title: 'Position conversion function: f(origXPos, origYPos), should return x,y coordinates as double from 0 to 1 each',
|
|
338
|
+ type: 'string',
|
|
339
|
+ default: 'return {x: origXPos, y: origYPos};'
|
|
340
|
+ },
|
|
341
|
+ markerOffsetX: {
|
|
342
|
+ title: 'Marker X offset relative to position',
|
|
343
|
+ type: 'number',
|
|
344
|
+ default: 0.5
|
|
345
|
+ },
|
|
346
|
+ markerOffsetY: {
|
|
347
|
+ title: 'Marker Y offset relative to position',
|
|
348
|
+ type: 'number',
|
|
349
|
+ default: 1
|
|
350
|
+ },
|
326
|
351
|
color: {
|
327
|
352
|
title: 'Color',
|
328
|
353
|
type: 'string'
|
...
|
...
|
@@ -366,14 +391,40 @@ export const commonMapSettingsSchema = |
366
|
391
|
required: []
|
367
|
392
|
},
|
368
|
393
|
form: [
|
369
|
|
- 'defaultZoomLevel',
|
370
|
|
- 'useDefaultCenterPosition',
|
371
|
|
- 'defaultCenterPosition',
|
372
|
|
- 'fitMapBounds',
|
|
394
|
+ {
|
|
395
|
+ key: 'defaultZoomLevel',
|
|
396
|
+ condition: 'model.provider !== "image-map"'
|
|
397
|
+ },
|
|
398
|
+ {
|
|
399
|
+ key: 'useDefaultCenterPosition',
|
|
400
|
+ condition: 'model.provider !== "image-map"'
|
|
401
|
+ },
|
|
402
|
+ {
|
|
403
|
+ key: 'defaultCenterPosition',
|
|
404
|
+ condition: 'model.provider !== "image-map"'
|
|
405
|
+ },
|
|
406
|
+ {
|
|
407
|
+ key: 'fitMapBounds',
|
|
408
|
+ condition: 'model.provider !== "image-map"'
|
|
409
|
+ },
|
373
|
410
|
'draggableMarker',
|
374
|
411
|
'disableScrollZooming',
|
375
|
|
- 'latKeyName',
|
376
|
|
- 'lngKeyName',
|
|
412
|
+ {
|
|
413
|
+ key: 'latKeyName',
|
|
414
|
+ condition: 'model.provider !== "image-map"'
|
|
415
|
+ },
|
|
416
|
+ {
|
|
417
|
+ key: 'lngKeyName',
|
|
418
|
+ condition: 'model.provider !== "image-map"'
|
|
419
|
+ },
|
|
420
|
+ {
|
|
421
|
+ key: 'xPosKeyName',
|
|
422
|
+ condition: 'model.provider === "image-map"'
|
|
423
|
+ },
|
|
424
|
+ {
|
|
425
|
+ key: 'yPosKeyName',
|
|
426
|
+ condition: 'model.provider === "image-map"'
|
|
427
|
+ },
|
377
|
428
|
'showLabel',
|
378
|
429
|
'label',
|
379
|
430
|
'useLabelFunction',
|
...
|
...
|
@@ -408,6 +459,19 @@ export const commonMapSettingsSchema = |
408
|
459
|
type: 'javascript'
|
409
|
460
|
},
|
410
|
461
|
{
|
|
462
|
+ key: 'markerOffsetX',
|
|
463
|
+ condition: 'model.provider === "image-map"'
|
|
464
|
+ },
|
|
465
|
+ {
|
|
466
|
+ key: 'markerOffsetY',
|
|
467
|
+ condition: 'model.provider === "image-map"'
|
|
468
|
+ },
|
|
469
|
+ {
|
|
470
|
+ key: 'posFunction',
|
|
471
|
+ type: 'javascript',
|
|
472
|
+ condition: 'model.provider === "image-map"'
|
|
473
|
+ },
|
|
474
|
+ {
|
411
|
475
|
key: 'color',
|
412
|
476
|
type: 'color'
|
413
|
477
|
},
|
...
|
...
|
@@ -632,123 +696,6 @@ export const imageMapSettingsSchema = |
632
|
696
|
title: 'Image URL source entity attribute',
|
633
|
697
|
type: 'string',
|
634
|
698
|
default: ''
|
635
|
|
- },
|
636
|
|
- disableScrollZooming: {
|
637
|
|
- title: 'Disable scroll zooming',
|
638
|
|
- type: 'boolean',
|
639
|
|
- default: false
|
640
|
|
- },
|
641
|
|
- xPosKeyName: {
|
642
|
|
- title: 'X position key name',
|
643
|
|
- type: 'string',
|
644
|
|
- default: 'xPos'
|
645
|
|
- },
|
646
|
|
- yPosKeyName: {
|
647
|
|
- title: 'Y position key name',
|
648
|
|
- type: 'string',
|
649
|
|
- default: 'yPos'
|
650
|
|
- },
|
651
|
|
- showLabel: {
|
652
|
|
- title: 'Show label',
|
653
|
|
- type: 'boolean',
|
654
|
|
- default: true
|
655
|
|
- },
|
656
|
|
- label: {
|
657
|
|
- title: 'Label (pattern examples: \'${entityName}\', \'${entityName}: (Text ${keyName} units.)\' )',
|
658
|
|
- type: 'string',
|
659
|
|
- default: '${entityName}'
|
660
|
|
- },
|
661
|
|
- useLabelFunction: {
|
662
|
|
- title: 'Use label function',
|
663
|
|
- type: 'boolean',
|
664
|
|
- default: false
|
665
|
|
- },
|
666
|
|
- labelFunction: {
|
667
|
|
- title: 'Label function: f(data, dsData, dsIndex)',
|
668
|
|
- type: 'string'
|
669
|
|
- },
|
670
|
|
- showTooltip: {
|
671
|
|
- title: 'Show tooltip',
|
672
|
|
- type: 'boolean',
|
673
|
|
- default: true
|
674
|
|
- },
|
675
|
|
- showTooltipAction: {
|
676
|
|
- title: 'Action for displaying the tooltip',
|
677
|
|
- type: 'string',
|
678
|
|
- default: 'click'
|
679
|
|
- },
|
680
|
|
- autocloseTooltip: {
|
681
|
|
- title: 'Auto-close tooltips',
|
682
|
|
- type: 'boolean',
|
683
|
|
- default: true
|
684
|
|
- },
|
685
|
|
- tooltipPattern: {
|
686
|
|
- title: 'Tooltip (for ex. \'Text ${keyName} units.\' or <link-act name=\'my-action\'>Link text</link-act>\')',
|
687
|
|
- type: 'string',
|
688
|
|
- default: '<b>${entityName}</b><br/><br/><b>X Pos:</b> ${xPos:2}<br/><b>Y Pos:</b> ${yPos:2}'
|
689
|
|
- },
|
690
|
|
- useTooltipFunction: {
|
691
|
|
- title: 'Use tooltip function',
|
692
|
|
- type: 'boolean',
|
693
|
|
- default: false
|
694
|
|
- },
|
695
|
|
- tooltipFunction: {
|
696
|
|
- title: 'Tooltip function: f(data, dsData, dsIndex)',
|
697
|
|
- type: 'string'
|
698
|
|
- },
|
699
|
|
- color: {
|
700
|
|
- title: 'Color',
|
701
|
|
- type: 'string'
|
702
|
|
- },
|
703
|
|
- posFunction: {
|
704
|
|
- title: 'Position conversion function: f(origXPos, origYPos), should return x,y coordinates as double from 0 to 1 each',
|
705
|
|
- type: 'string',
|
706
|
|
- default: 'return {x: origXPos, y: origYPos};'
|
707
|
|
- },
|
708
|
|
- markerOffsetX: {
|
709
|
|
- title: 'Marker X offset relative to position',
|
710
|
|
- type: 'number',
|
711
|
|
- default: 0.5
|
712
|
|
- },
|
713
|
|
- markerOffsetY: {
|
714
|
|
- title: 'Marker Y offset relative to position',
|
715
|
|
- type: 'number',
|
716
|
|
- default: 1
|
717
|
|
- },
|
718
|
|
- useColorFunction: {
|
719
|
|
- title: 'Use color function',
|
720
|
|
- type: 'boolean',
|
721
|
|
- default: false
|
722
|
|
- },
|
723
|
|
- colorFunction: {
|
724
|
|
- title: 'Color function: f(data, dsData, dsIndex)',
|
725
|
|
- type: 'string'
|
726
|
|
- },
|
727
|
|
- markerImage: {
|
728
|
|
- title: 'Custom marker image',
|
729
|
|
- type: 'string'
|
730
|
|
- },
|
731
|
|
- markerImageSize: {
|
732
|
|
- title: 'Custom marker image size (px)',
|
733
|
|
- type: 'number',
|
734
|
|
- default: 34
|
735
|
|
- },
|
736
|
|
- useMarkerImageFunction: {
|
737
|
|
- title: 'Use marker image function',
|
738
|
|
- type: 'boolean',
|
739
|
|
- default: false
|
740
|
|
- },
|
741
|
|
- markerImageFunction: {
|
742
|
|
- title: 'Marker image function: f(data, images, dsData, dsIndex)',
|
743
|
|
- type: 'string'
|
744
|
|
- },
|
745
|
|
- markerImages: {
|
746
|
|
- title: 'Marker images',
|
747
|
|
- type: 'array',
|
748
|
|
- items: {
|
749
|
|
- title: 'Marker image',
|
750
|
|
- type: 'string'
|
751
|
|
- }
|
752
|
699
|
}
|
753
|
700
|
},
|
754
|
701
|
required: []
|
...
|
...
|
@@ -759,77 +706,7 @@ export const imageMapSettingsSchema = |
759
|
706
|
type: 'image'
|
760
|
707
|
},
|
761
|
708
|
'imageEntityAlias',
|
762
|
|
- 'imageUrlAttribute',
|
763
|
|
- 'disableScrollZooming',
|
764
|
|
- 'xPosKeyName',
|
765
|
|
- 'yPosKeyName',
|
766
|
|
- 'showLabel',
|
767
|
|
- 'label',
|
768
|
|
- 'useLabelFunction',
|
769
|
|
- {
|
770
|
|
- key: 'labelFunction',
|
771
|
|
- type: 'javascript'
|
772
|
|
- },
|
773
|
|
- 'showTooltip',
|
774
|
|
- {
|
775
|
|
- key: 'showTooltipAction',
|
776
|
|
- type: 'rc-select',
|
777
|
|
- multiple: false,
|
778
|
|
- items: [
|
779
|
|
- {
|
780
|
|
- value: 'click',
|
781
|
|
- label: 'Show tooltip on click (Default)'
|
782
|
|
- },
|
783
|
|
- {
|
784
|
|
- value: 'hover',
|
785
|
|
- label: 'Show tooltip on hover'
|
786
|
|
- }
|
787
|
|
- ]
|
788
|
|
- },
|
789
|
|
- 'autocloseTooltip',
|
790
|
|
- {
|
791
|
|
- key: 'tooltipPattern',
|
792
|
|
- type: 'textarea'
|
793
|
|
- },
|
794
|
|
- 'useTooltipFunction',
|
795
|
|
- {
|
796
|
|
- key: 'tooltipFunction',
|
797
|
|
- type: 'javascript'
|
798
|
|
- },
|
799
|
|
- {
|
800
|
|
- key: 'color',
|
801
|
|
- type: 'color'
|
802
|
|
- },
|
803
|
|
- {
|
804
|
|
- key: 'posFunction',
|
805
|
|
- type: 'javascript'
|
806
|
|
- },
|
807
|
|
- 'markerOffsetX',
|
808
|
|
- 'markerOffsetY',
|
809
|
|
- 'useColorFunction',
|
810
|
|
- {
|
811
|
|
- key: 'colorFunction',
|
812
|
|
- type: 'javascript'
|
813
|
|
- },
|
814
|
|
- {
|
815
|
|
- key: 'markerImage',
|
816
|
|
- type: 'image'
|
817
|
|
- },
|
818
|
|
- 'markerImageSize',
|
819
|
|
- 'useMarkerImageFunction',
|
820
|
|
- {
|
821
|
|
- key: 'markerImageFunction',
|
822
|
|
- type: 'javascript'
|
823
|
|
- },
|
824
|
|
- {
|
825
|
|
- key: 'markerImages',
|
826
|
|
- items: [
|
827
|
|
- {
|
828
|
|
- key: 'markerImages[]',
|
829
|
|
- type: 'image'
|
830
|
|
- }
|
831
|
|
- ]
|
832
|
|
- }
|
|
709
|
+ 'imageUrlAttribute'
|
833
|
710
|
]
|
834
|
711
|
};
|
835
|
712
|
|
...
|
...
|
|