-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
region_type_plugin_com_jk64_report_google_map_r1.sql
4027 lines (4027 loc) · 552 KB
/
region_type_plugin_com_jk64_report_google_map_r1.sql
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
prompt --application/set_environment
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle user
-- APEX_180200 or as the owner (parsing schema) of the application.
--
-- NOTE: Calls to apex_application_install override the defaults below.
--
--------------------------------------------------------------------------------
begin
wwv_flow_api.import_begin (
p_version_yyyy_mm_dd=>'2018.05.24'
,p_release=>'18.2.0.00.12'
,p_default_workspace_id=>20749515040658038
,p_default_application_id=>15181
,p_default_owner=>'SAMPLE'
);
end;
/
prompt --application/shared_components/plugins/region_type/com_jk64_report_google_map_r1
begin
wwv_flow_api.create_plugin(
p_id=>wwv_flow_api.id(184856223301707224)
,p_plugin_type=>'REGION TYPE'
,p_name=>'COM.JK64.REPORT_GOOGLE_MAP_R1'
,p_display_name=>'JK64 Report Google Map R1'
,p_supported_ui_types=>'DESKTOP:JQM_SMARTPHONE'
,p_javascript_file_urls=>'#PLUGIN_FILES#jk64reportmap_r1#MIN#.js'
,p_css_file_urls=>'#PLUGIN_FILES#jk64reportmap_r1#MIN#.css'
,p_plsql_code=>wwv_flow_string.join(wwv_flow_t_varchar2(
'-- jk64 ReportMap v1.6 Dec 2023',
'-- https://github.com/jeffreykemp/jk64-plugin-reportmap',
'-- Copyright (c) 2016 - 2023 Jeffrey Kemp',
'-- Released under the MIT licence: http://opensource.org/licenses/mit-license',
'',
'-- format to use to convert a lat/lng number to string for passing via javascript',
'-- 0.0000001 is enough precision for the practical limit of commercial surveying, error up to +/- 11.132 mm at the equator',
'g_tochar_format constant varchar2(100) := ''fm990.0999999'';',
'g_coord_precision constant number := 6;',
'',
'-- if only one row is returned by the query, add this +/- to the latitude extents so it',
'-- shows the neighbourhood instead of zooming to the max',
'g_single_row_lat_margin constant number := 0.005;',
'',
'g_visualisation_pins constant varchar2(10) := ''PINS''; -- default',
'g_visualisation_infolayer constant varchar2(10) := ''INFOLAYER'';',
'g_visualisation_cluster constant varchar2(10) := ''CLUSTER'';',
'g_visualisation_spiderfier constant varchar2(10) := ''SPIDERFIER'';',
'g_visualisation_heatmap constant varchar2(10) := ''HEATMAP'';',
'g_visualisation_directions constant varchar2(10) := ''DIRECTIONS'';',
'g_visualisation_geojson constant varchar2(10) := ''GEOJSON'';',
'',
'g_maptype_roadmap constant varchar2(10) := ''ROADMAP''; -- default',
'g_maptype_satellite constant varchar2(10) := ''SATELLITE'';',
'g_maptype_hybrid constant varchar2(10) := ''HYBRID'';',
'g_maptype_terrain constant varchar2(10) := ''TERRAIN'';',
'',
'g_travelmode_driving constant varchar2(10) := ''DRIVING''; -- default',
'g_travelmode_walking constant varchar2(10) := ''WALKING'';',
'g_travelmode_bicycling constant varchar2(10) := ''BICYCLING'';',
'g_travelmode_transit constant varchar2(10) := ''TRANSIT'';',
'',
'g_option_pan_on_click constant varchar2(30) := '':PAN_ON_CLICK:''; -- default',
'g_option_draggable constant varchar2(30) := '':DRAGGABLE:'';',
'g_option_pan_allowed constant varchar2(30) := '':PAN_ALLOWED:''; -- default',
'g_option_zoom_allowed constant varchar2(30) := '':ZOOM_ALLOWED:''; -- default',
'g_option_drag_drop_geojson constant varchar2(30) := '':GEOJSON_DRAGDROP:'';',
'g_option_disable_autofit constant varchar2(30) := '':DISABLEFITBOUNDS:'';',
'g_option_spinner constant varchar2(30) := '':SPINNER:''; -- default',
'g_option_suppress_ndf constant varchar2(30) := '':SUPPRESS_NDF:'';',
'g_option_detailed_mouse constant varchar2(30) := '':DETAILED_MOUSE_EVENTS:'';',
'',
'g_unitsystem_metric constant varchar2(30) := ''METRIC''; -- default',
'g_unitsystem_imperial constant varchar2(30) := ''IMPERIAL'';',
'',
'subtype plugin_attr is varchar2(32767);',
'',
'function latlng_literal (lat in number, lng in number) return varchar2 is',
'begin',
' return case when lat is not null and lng is not null then',
' ''{''',
' || apex_javascript.add_attribute(''lat'', round(lat,g_coord_precision))',
' || apex_javascript.add_attribute(''lng'', round(lng,g_coord_precision)',
' , false, false)',
' || ''}''',
' end;',
'end latlng_literal;',
'',
'function bounds_literal (south in number, west in number, north in number, east in number) return varchar2 is',
'begin',
' return case when south is not null and west is not null and north is not null and east is not null then',
' ''{''',
' || apex_javascript.add_attribute(''south'', round(south, g_coord_precision))',
' || apex_javascript.add_attribute(''west'', round(west, g_coord_precision))',
' || apex_javascript.add_attribute(''north'', round(north, g_coord_precision))',
' || apex_javascript.add_attribute(''east'', round(east, g_coord_precision)',
' , false, false)',
' || ''}''',
' end;',
'end bounds_literal;',
'',
'procedure parse_latlng (p_val in varchar2, p_label in varchar2, p_lat out number, p_lng out number) is',
' delim_pos number;',
'begin',
' -- allow space as the delimiter; this should be used in locales which use comma (,) as decimal separator',
' if instr(trim(p_val),'' '') > 0 then',
' delim_pos := instr(p_val,'' '');',
' else',
' delim_pos := instr(p_val,'','');',
' end if;',
' p_lat := apex_plugin_util.get_attribute_as_number(substr(p_val,1,delim_pos-1), p_label || '' latitude'');',
' p_lng := apex_plugin_util.get_attribute_as_number(substr(p_val,delim_pos+1), p_label || '' longitude'');',
'end parse_latlng;',
'',
'function valid_zoom_level (p_attr in varchar2, p_label in varchar2) return number is',
' n number;',
'begin',
' n := apex_plugin_util.get_attribute_as_number(p_attr, p_label);',
' -- note: this validation is not perfect because not all map areas necessarily have coverage at high zoom',
' -- levels; the map will only zoom as far as it can',
' if not n between 0 and 23 then',
' raise_application_error(-20000, p_label || '': must be in range 0..23 ("'' || p_attr || ''")'');',
' end if;',
' return n;',
'end valid_zoom_level;',
'',
'function get_source (p_region in apex_plugin.t_region) return varchar2 is',
' l_region apex_application_page_regions%rowtype;',
' l_visualisation plugin_attr := p_region.attribute_02;',
' l_result varchar2(32767);',
'begin',
' select r.*',
' into l_region',
' from apex_application_page_regions r',
' where r.region_id = p_region.id;',
'',
' apex_debug.message(''source type: '' || l_region.query_type_code || '' ('' || l_region.location || '' - '' || l_region.query_type || '')'');',
'',
' if l_region.query_type is not null then',
'',
' if l_region.location_code = ''LOCAL'' then',
'',
' l_result := case l_region.query_type_code',
' when ''SQL''',
' then p_region.source',
' when ''FUNC_BODY_RETURNING_SQL''',
' then apex_plugin_util.get_plsql_function_result(p_region.source)',
' when ''TABLE''',
' then ''select ''',
' || case l_visualisation',
' when g_visualisation_heatmap then ''lat,lng,weight''',
' when g_visualisation_geojson then ''geojson''',
' else case when l_region.include_rowid_column = ''Yes''',
' then ''lat,lng,name,rowid as id''',
' else ''lat,lng,name,id''',
' end',
' end',
' || '' from ''',
' || case when l_region.table_owner is not null then ''"'' || l_region.table_owner || ''".'' end',
' || ''"'' || l_region.table_name || ''" "'' || l_region.table_name || ''"''',
' || case when l_region.where_clause is not null then '' where ('' || l_region.where_clause || '')'' end',
' || case when l_region.order_by_clause is not null then '' order by '' || l_region.order_by_clause end',
' end;',
'',
' if l_result is null then',
' raise_application_error(-20001, ''Unsupported region source ('' || l_region.query_type || ''); must be Table/View, SQL Query or PL/SQL Function Body returning SQL'');',
' end if;',
'',
' elsif l_region.location is not null then',
' raise_application_error(-20001, ''Unsupported source location ('' || l_region.location || ''); must be Local Database'');',
' end if;',
'',
' end if;',
'',
' apex_debug.message(''source: '' || l_result);',
'',
' return l_result;',
'end get_source;',
'',
'procedure prn_mapdata (p_region in apex_plugin.t_region) is',
'',
' l_source varchar2(32767);',
' l_flex varchar2(32767);',
' l_buf varchar2(32767);',
' l_column_list apex_plugin_util.t_column_value_list2;',
' l_visualisation plugin_attr := p_region.attribute_02;',
' l_escape_special_chars plugin_attr := p_region.attribute_24;',
' l_first_row number;',
' l_max_rows number;',
' l_geojson_clob clob;',
' l_chunk_size number := 32767;',
' l_rows_emitted number := 0;',
'',
' function varchar2_field (attr_no in number, i in number) return varchar2 is',
' r varchar2(4000);',
' begin',
' if l_column_list.exists(attr_no) then',
' -- whatever data type was in the original source, get it as a string',
' r := sys.htf.escape_sc(',
' apex_plugin_util.get_value_as_varchar2 (',
' p_data_type => l_column_list(attr_no).data_type,',
' p_value => l_column_list(attr_no).value_list(i)',
' ));',
' end if;',
' return r;',
' end varchar2_field;',
'',
' function number_field (attr_no in number, i in number) return number is',
' r number;',
' begin',
' if l_column_list(attr_no).data_type = apex_plugin_util.c_data_type_number then',
' r := l_column_list(attr_no).value_list(i).number_value;',
' else',
' r := to_number(varchar2_field(attr_no, i));',
' end if;',
' return r;',
' exception',
' when value_error then',
' raise_application_error(-20000, ''Unable to convert data to number ['' || varchar2_field(attr_no, i) || '']'');',
' end number_field;',
'',
' -- return a latitude or longitude as a number formatted as a string suitable for embedding in json',
' function lat_or_lng_field (attr_no in number, i in number) return varchar2 is',
' r number;',
' begin',
' if l_column_list(attr_no).data_type = apex_plugin_util.c_data_type_number then',
' r := l_column_list(attr_no).value_list(i).number_value;',
' else',
' r := to_number(varchar2_field(attr_no, i));',
' end if;',
' return nvl(to_char(r, g_tochar_format),''null'');',
' exception',
' when value_error then',
' raise_application_error(-20000, ''Unable to convert data to ''',
' || case attr_no when 1 then ''latitude'' when 2 then ''longitude'' else ''lat/lng'' end',
' || '' ['' || varchar2_field(attr_no, i) || '']'');',
' end lat_or_lng_field;',
'',
' function flex_field (attr_no in number, i in number, offset in number) return varchar2 is',
' d varchar2(4000);',
' begin',
' if l_column_list.exists(attr_no+offset) then',
' d := apex_plugin_util.get_value_as_varchar2 (',
' p_data_type => l_column_list(attr_no+offset).data_type,',
' p_value => l_column_list(attr_no+offset).value_list(i)',
' );',
' if l_escape_special_chars=''Y'' then',
' d := sys.htf.escape_sc(d);',
' end if;',
' end if;',
' return apex_javascript.add_attribute(''a''||attr_no,d);',
' end flex_field;',
'',
'begin',
' apex_debug.message(''reportmap x01 (first row): '' || apex_application.g_x01);',
' apex_debug.message(''reportmap x02 (max rows): '' || apex_application.g_x02);',
'',
' l_first_row := to_number(apex_application.g_x01);',
' l_max_rows := to_number(apex_application.g_x02);',
'',
' l_source := get_source(p_region);',
'',
' if l_source is not null then',
'',
' case',
' when l_visualisation = g_visualisation_heatmap then',
'',
' l_column_list := apex_plugin_util.get_data2',
' (p_sql_statement => l_source',
' ,p_min_columns => 3',
' ,p_max_columns => 3',
' ,p_component_name => p_region.name',
' ,p_max_rows => l_max_rows);',
'',
' for i in 1 .. l_column_list(1).value_list.count loop',
'',
' -- minimise size of data to be sent by encoding it as an array of arrays',
' l_buf := ''['' || lat_or_lng_field(1,i)',
' || '','' || lat_or_lng_field(2,i)',
' || '','' || greatest( nvl( round( number_field(3,i) ), 1), 1)',
' || '']'';',
'',
' if i < 8 /*don''t send the whole dataset to debug log*/ then',
' apex_debug.message(''#'' || i || '': '' || l_buf);',
' end if;',
'',
' if i>1 then',
' sys.htp.prn('','');',
' end if;',
'',
' sys.htp.prn(l_buf);',
'',
' l_rows_emitted := l_rows_emitted + 1;',
'',
' end loop;',
'',
' when l_visualisation = g_visualisation_geojson then',
'',
' l_column_list := apex_plugin_util.get_data2',
' (p_sql_statement => l_source',
' ,p_min_columns => 1',
' ,p_max_columns => 12',
' ,p_component_name => p_region.name',
' ,p_first_row => l_first_row',
' ,p_max_rows => l_max_rows',
' );',
'',
' for i in 1 .. l_column_list(1).value_list.count loop',
'',
' if i>1 then',
' sys.htp.prn('','');',
' end if;',
'',
' sys.htp.prn(''{"geojson":'');',
'',
' if l_column_list(1).data_type = apex_plugin_util.c_data_type_clob then',
'',
' l_geojson_clob := l_column_list(1).value_list(i).clob_value;',
'',
' -- send the clob down in chunks',
'',
' for j in 0 .. floor(length(l_geojson_clob)/l_chunk_size) loop',
'',
' l_buf := substr(l_geojson_clob, j * l_chunk_size + 1, l_chunk_size);',
'',
' if i < 8 and j = 0 /*don''t send the whole dataset to debug log*/ then',
' apex_debug.message(''#'' || i || '': '' || substr(l_buf,1,1000));',
' end if;',
'',
' sys.htp.prn(l_buf);',
'',
' end loop;',
'',
' else',
'',
' l_buf := varchar2_field(1,i);',
'',
' if i < 8 /*don''t send the whole dataset to debug log*/ then',
' apex_debug.message(''#'' || i || '': '' || substr(l_buf,1,1000));',
' end if;',
'',
' sys.htp.prn(l_buf);',
'',
' end if;',
'',
' -- get flex fields, if any',
' l_flex := null;',
' for attr_no in 1..10 loop',
' l_flex := l_flex || flex_field(attr_no, i, offset => 3);',
' end loop;',
'',
' l_buf := '',''',
' || apex_javascript.add_attribute(''n'',varchar2_field(2,i)) /*name*/',
' || apex_javascript.add_attribute(''d'',varchar2_field(3,i)) /*id*/',
' || case when l_flex is not null then',
' ''"f":{'' || rtrim(l_flex,'','') || ''}''',
' end;',
'',
' l_buf := rtrim(l_buf, '','');',
'',
' sys.htp.prn(l_buf || ''}'');',
'',
' l_rows_emitted := l_rows_emitted + 1;',
'',
' end loop;',
'',
' else',
' -- "pin" type visualisations',
'',
' l_column_list := apex_plugin_util.get_data2',
' (p_sql_statement => l_source',
' ,p_min_columns => 4',
' ,p_max_columns => 17',
' ,p_component_name => p_region.name',
' ,p_first_row => l_first_row',
' ,p_max_rows => l_max_rows);',
'',
' for i in 1..l_column_list(1).value_list.count loop',
'',
' -- get flex fields, if any',
' l_flex := null;',
' for attr_no in 1..10 loop',
' l_flex := l_flex || flex_field(attr_no, i, offset => 7);',
' end loop;',
'',
' l_buf := ''"x":'' || lat_or_lng_field(1,i) || '','' /*lat*/',
' || ''"y":'' || lat_or_lng_field(2,i) || '','' /*lng*/',
' || apex_javascript.add_attribute(''n'',varchar2_field(3,i)) /*name*/',
' || apex_javascript.add_attribute(''d'',varchar2_field(4,i)) /*id*/',
' || apex_javascript.add_attribute(''i'',varchar2_field(5,i)) /*info*/',
' || apex_javascript.add_attribute(''c'',varchar2_field(6,i)) /*icon*/',
' || apex_javascript.add_attribute(''l'',substr(varchar2_field(7,i),1,1)) /*label*/',
' || case when l_flex is not null then',
' ''"f":{'' || rtrim(l_flex,'','') || ''}''',
' end;',
'',
' l_buf := ''{'' || rtrim(l_buf,'','') || ''}'';',
'',
' if i < 8 /*don''t send the whole dataset to debug log*/ then',
' apex_debug.message(''#'' || i || '': '' || substr(l_buf,1,1000));',
' end if;',
'',
' if i>1 then',
' sys.htp.prn('','');',
' end if;',
'',
' sys.htp.prn(l_buf);',
'',
' l_rows_emitted := l_rows_emitted + 1;',
'',
' end loop;',
'',
' end case;',
'',
' end if;',
'',
'exception',
' when others then',
' apex_debug.error(sqlerrm);',
' apex_debug.message(dbms_utility.format_error_stack);',
' apex_debug.message(dbms_utility.format_call_stack);',
' sys.htp.p(case when l_rows_emitted>0 then '','' end',
' || ''{"error":'' || apex_escape.js_literal(sqlerrm,''"'') || ''}'');',
'end prn_mapdata;',
'',
'function render',
' (p_region in apex_plugin.t_region',
' ,p_plugin in apex_plugin.t_plugin',
' ,p_is_printer_friendly in boolean',
' ) return apex_plugin.t_region_render_result is',
'',
' l_result apex_plugin.t_region_render_result;',
'',
' -- Component settings',
' l_api_key plugin_attr := p_plugin.attribute_01;',
' l_no_address_results_msg plugin_attr := p_plugin.attribute_02;',
' l_directions_not_found_msg plugin_attr := p_plugin.attribute_03;',
' l_directions_zero_results_msg plugin_attr := p_plugin.attribute_04;',
' l_min_zoom number; --attribute_05',
' l_max_zoom number; --attribute_06',
' l_max_rows number; --attribute_07',
' l_unit_system plugin_attr := p_plugin.attribute_08;',
' l_plugin_resource_path plugin_attr := p_plugin.attribute_09;',
'',
' -- Plugin attributes',
' l_map_height plugin_attr := p_region.attribute_01;',
' l_visualisation plugin_attr := p_region.attribute_02;',
' l_click_zoom_level number; --attribute_03',
' l_options plugin_attr := p_region.attribute_04;',
' l_initial_zoom_level number; --attribute_05',
' l_initial_center plugin_attr := p_region.attribute_06;',
' l_rows_per_batch number; --attribute_07',
' l_language plugin_attr := p_region.attribute_08;',
' l_region plugin_attr := p_region.attribute_09;',
' l_restrict_country plugin_attr := p_region.attribute_10;',
' l_mapstyle plugin_attr := p_region.attribute_11;',
' l_heatmap_dissipating plugin_attr := p_region.attribute_12;',
' l_heatmap_opacity number; --attribute_13',
' l_heatmap_radius number; --attribute_14',
' l_travel_mode plugin_attr := p_region.attribute_15;',
' l_drawing_modes plugin_attr := p_region.attribute_16;',
' l_optimizewaypoints plugin_attr := p_region.attribute_21;',
' l_maptype plugin_attr := p_region.attribute_22;',
' l_gesture_handling plugin_attr := p_region.attribute_25;',
'',
' l_source varchar2(32767);',
' l_region_id varchar2(100);',
' l_lat number;',
' l_lng number;',
' l_opt varchar2(32767);',
' l_js_options varchar2(1000);',
' l_dragdrop_geojson boolean;',
' l_init_js_code plugin_attr;',
'',
'begin',
' if apex_application.g_debug then',
' apex_plugin_util.debug_region',
' (p_plugin => p_plugin',
' ,p_region => p_region',
' ,p_is_printer_friendly => p_is_printer_friendly);',
' end if;',
'',
' if l_api_key is null or instr(l_api_key,''('') > 0 then',
' raise_application_error(-20000, ''Google Maps API Key is required (set in Component Settings)'');',
' end if;',
'',
' l_region_id := case',
' when p_region.static_id is not null',
' then p_region.static_id',
' else ''R''||p_region.id',
' end;',
' apex_debug.message(''map region: '' || l_region_id);',
'',
' l_source := get_source(p_region);',
' l_init_js_code := p_region.init_javascript_code;',
'',
' -- Component settings',
' l_min_zoom := valid_zoom_level(p_plugin.attribute_05, ''Min. Zoom'');',
' l_max_zoom := valid_zoom_level(p_plugin.attribute_06, ''Max. Zoom'');',
' l_max_rows := apex_plugin_util.get_attribute_as_number(p_plugin.attribute_07, ''Maximum Records'');',
'',
' -- Plugin attributes',
' l_click_zoom_level := valid_zoom_level(p_region.attribute_03, ''Zoom Level on Click'');',
' l_initial_zoom_level := valid_zoom_level(p_region.attribute_05, ''Initial Zoom Level'');',
' l_heatmap_opacity := apex_plugin_util.get_attribute_as_number(p_region.attribute_13, ''Heatmap Opacity'');',
' l_heatmap_radius := apex_plugin_util.get_attribute_as_number(p_region.attribute_14, ''Heatmap Radius'');',
' l_dragdrop_geojson := instr('':''||l_options||'':'',g_option_drag_drop_geojson)>0;',
'',
' if l_initial_center is not null then',
' parse_latlng(l_initial_center, p_label=>''Initial Map Center'', p_lat=>l_lat, p_lng=>l_lng);',
' end if;',
'',
' if l_visualisation not in (g_visualisation_heatmap, g_visualisation_directions) then',
' l_rows_per_batch := apex_plugin_util.get_attribute_as_number(p_region.attribute_07, ''Rows per Batch'');',
' end if;',
'',
' if l_drawing_modes is not null then',
' -- convert colon-delimited list "marker:polygon:polyline:rectangle:circle"',
' -- to a javascript array "''marker'',''polygon'',''polyline'',''rectangle'',''circle''"',
' l_drawing_modes := '''''''' || replace(l_drawing_modes,'':'','''''','''''') || '''''''';',
' end if;',
'',
' if l_visualisation = g_visualisation_heatmap then',
'',
' l_js_options := l_js_options || ''&libraries=visualization'';',
'',
' elsif l_drawing_modes is not null then',
'',
' l_js_options := l_js_options || ''&libraries=drawing'';',
'',
' end if;',
'',
' if l_language is not null then',
' l_js_options := l_js_options || ''&language='' || l_language;',
' end if;',
'',
' if l_region is not null then',
' l_js_options := l_js_options || ''®ion='' || l_region;',
' end if;',
'',
' apex_javascript.add_library',
' (p_name => ''js?key='' || l_api_key || l_js_options',
' ,p_directory => ''https://maps.googleapis.com/maps/api/''',
' ,p_skip_extension => true',
' ,p_key => ''https://maps.googleapis.com/maps/api/js'' -- don''t load multiple google maps APIs on same page',
' );',
'',
' if l_visualisation = g_visualisation_cluster then',
'',
' -- MarkerClustererPlus for Google Maps V3',
' apex_javascript.add_library',
' (p_name => ''markerclusterer.min''',
' ,p_directory => p_plugin.file_prefix);',
'',
' elsif l_visualisation = g_visualisation_spiderfier then',
'',
' -- OverlappingMarkerSpiderfier',
' apex_javascript.add_library',
' (p_name => ''oms.min''',
' ,p_directory => p_plugin.file_prefix);',
'',
' end if;',
'',
' -- use nullif to convert default values to null; this can reduce the footprint of the generated code',
' l_opt := ''{''',
' || apex_javascript.add_attribute(''regionId'', l_region_id)',
' || apex_javascript.add_attribute(''expectData'', nullif(l_source is not null,true))',
' || apex_javascript.add_attribute(''maximumRows'', l_max_rows)',
' || apex_javascript.add_attribute(''rowsPerBatch'', l_rows_per_batch)',
' || apex_javascript.add_attribute(''visualisation'', lower(nullif(l_visualisation,g_visualisation_pins)))',
' || apex_javascript.add_attribute(''mapType'', lower(nullif(l_maptype,g_maptype_roadmap)))',
' || apex_javascript.add_attribute(''minZoom'', nullif(l_min_zoom,1))',
' || apex_javascript.add_attribute(''maxZoom'', l_max_zoom)',
' || apex_javascript.add_attribute(''initialZoom'', nullif(l_initial_zoom_level,2))',
' || case when l_lat!=0 or l_lng!=0 then',
' ''"initialCenter":'' || latlng_literal(l_lat,l_lng) || '',''',
' end',
' || apex_javascript.add_attribute(''clickZoomLevel'', l_click_zoom_level)',
' || apex_javascript.add_attribute(''isDraggable'', nullif(instr('':''||l_options||'':'',g_option_draggable)>0,false))',
' || case when l_visualisation = g_visualisation_heatmap then',
' apex_javascript.add_attribute(''heatmapDissipating'', nullif(l_heatmap_dissipating=''Y'',false))',
' || apex_javascript.add_attribute(''heatmapOpacity'', nullif(l_heatmap_opacity,0.6))',
' || apex_javascript.add_attribute(''heatmapRadius'', nullif(l_heatmap_radius,5))',
' end',
' || apex_javascript.add_attribute(''panOnClick'', nullif(instr('':''||l_options||'':'',g_option_pan_on_click)>0,true))',
' || apex_javascript.add_attribute(''restrictCountry'', l_restrict_country)',
' || case when l_mapstyle is not null then',
' ''"mapStyle":'' || l_mapstyle || '',''',
' end',
' || case when l_visualisation = g_visualisation_directions then',
' apex_javascript.add_attribute(''travelMode'', nullif(l_travel_mode,g_travelmode_driving))',
' || apex_javascript.add_attribute(''optimizeWaypoints'', nullif(l_optimizewaypoints=''Y'',false))',
' end',
' || apex_javascript.add_attribute(''unitSystem'', nullif(l_unit_system,g_unitsystem_metric))',
' || apex_javascript.add_attribute(''allowZoom'', nullif(instr('':''||l_options||'':'',g_option_zoom_allowed)>0,true))',
' || apex_javascript.add_attribute(''allowPan'', nullif(instr('':''||l_options||'':'',g_option_pan_allowed)>0,true))',
' || apex_javascript.add_attribute(''gestureHandling'', nullif(l_gesture_handling,''auto''))',
' || case when l_init_js_code is not null then',
' ''"initFn":function(){''',
' || chr(13)',
' || l_init_js_code',
' || chr(13) /* this handles the case if developer ends their javascript with a line comment // */',
' || ''},''',
' end',
' || case when l_drawing_modes is not null then',
' ''"drawingModes":['' || l_drawing_modes || ''],''',
' end',
' || apex_javascript.add_attribute(''dragDropGeoJSON'', nullif(l_dragdrop_geojson,false))',
' || apex_javascript.add_attribute(''autoFitBounds'', nullif(instr('':''||l_options||'':'',g_option_disable_autofit)=0,true)) --reverse meaning of option',
' || apex_javascript.add_attribute(''showSpinner'', nullif(instr('':''||l_options||'':'',g_option_spinner)>0,true))',
' || apex_javascript.add_attribute(''detailedMouseEvents'', nullif(instr('':''||l_options||'':'',g_option_detailed_mouse)>0,false))',
' || apex_javascript.add_attribute(''noDataMessage'', case when instr('':''||l_options||'':'',g_option_suppress_ndf)=0 -- set to null if message suppressed',
' then p_region.no_data_found_message',
' end)',
' || apex_javascript.add_attribute(''noAddressResults'', l_no_address_results_msg)',
' || apex_javascript.add_attribute(''directionsNotFound'', l_directions_not_found_msg)',
' || apex_javascript.add_attribute(''directionsZeroResults'', l_directions_zero_results_msg)',
' || apex_javascript.add_attribute(''ajaxIdentifier'', apex_plugin.get_ajax_identifier)',
' || apex_javascript.add_attribute(''ajaxItems'', apex_plugin_util.page_item_names_to_jquery(p_region.ajax_items_to_submit))',
' || apex_javascript.add_attribute(''pluginResourcePath'', l_plugin_resource_path)',
' || apex_javascript.add_attribute(''pluginFilePrefix'', p_plugin.file_prefix',
' ,false,false)',
' || ''}'';',
'',
' apex_debug.message(''map options: '' || l_opt);',
'',
' apex_javascript.add_onload_code(p_code =>',
' ''$("#map_'' || l_region_id || ''").reportmap('' || l_opt || '');''',
' );',
'',
' sys.htp.p(''<div id="map_'' || l_region_id || ''" class="reportmap" style="min-height:'' || l_map_height || ''px"></div>'');',
'',
' if l_dragdrop_geojson then',
' sys.htp.p(''<div id="drop_'' || l_region_id || ''" class="reportmap-drop-container"><div class="reportmap-drop-silhouette"></div></div>'');',
' end if;',
'',
' return l_result;',
'exception',
' when others then',
' apex_debug.error(sqlerrm);',
' apex_debug.message(dbms_utility.format_error_stack);',
' apex_debug.message(dbms_utility.format_call_stack);',
' raise;',
'end render;',
'',
'function ajax',
' (p_region in apex_plugin.t_region',
' ,p_plugin in apex_plugin.t_plugin',
' ) return apex_plugin.t_region_ajax_result is',
'',
' l_result apex_plugin.t_region_ajax_result;',
'',
'begin',
' if apex_application.g_debug then',
' apex_plugin_util.debug_region',
' (p_plugin => p_plugin',
' ,p_region => p_region);',
' end if;',
' apex_debug.message(''ajax'');',
'',
' sys.owa_util.mime_header(''text/plain'', false);',
' sys.htp.p(''Cache-Control: no-cache'');',
' sys.htp.p(''Pragma: no-cache'');',
' sys.owa_util.http_header_close;',
'',
' sys.htp.p(''{"mapdata":['');',
'',
' prn_mapdata(p_region => p_region);',
'',
' sys.htp.p('']}'');',
'',
' apex_debug.message(''ajax finished'');',
' return l_result;',
'exception',
' when others then',
' apex_debug.error(sqlerrm);',
' apex_debug.message(dbms_utility.format_error_stack);',
' apex_debug.message(dbms_utility.format_call_stack);',
' raise;',
'end ajax;'))
,p_api_version=>1
,p_render_function=>'render'
,p_ajax_function=>'ajax'
,p_standard_attributes=>'SOURCE_LOCATION:AJAX_ITEMS_TO_SUBMIT:NO_DATA_FOUND_MESSAGE:INIT_JAVASCRIPT_CODE'
,p_substitute_attributes=>true
,p_subscribe_plugin_settings=>false
,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
'<p>',
'This plugin renders a Google Map, showing a number of pins based on a query you supply with Latitude, Longitude, Name (pin hovertext), id, and Info.',
'</p><p>',
'Refer to the wiki for documentation and examples: <strong>https://github.com/jeffreykemp/jk64-plugin-reportmap/wiki</strong>.',
'</p><p>',
'Please raise any bugs or enhancements on GitHub: <strong>https://github.com/jeffreykemp/jk64-plugin-reportmap/issues</strong>.',
'</p>'))
,p_version_identifier=>'1.6'
,p_about_url=>'https://jeffreykemp.github.io/jk64-plugin-reportmap/'
,p_plugin_comment=>wwv_flow_string.join(wwv_flow_t_varchar2(
'Copyright (c) 2016 - 2023 Jeffrey Kemp',
'Released under the MIT licence: http://opensource.org/licenses/mit-license'))
,p_files_version=>873
);
end;
/
begin
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196436287268656050)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'APPLICATION'
,p_attribute_sequence=>1
,p_display_sequence=>10
,p_prompt=>'Google API Key'
,p_attribute_type=>'TEXT'
,p_is_required=>true
,p_display_length=>60
,p_is_translatable=>false
,p_help_text=>'A Google Maps API Key is required. Refer: https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196436714805656049)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'APPLICATION'
,p_attribute_sequence=>2
,p_display_sequence=>20
,p_prompt=>'No Address Results message'
,p_attribute_type=>'TEXT'
,p_is_required=>false
,p_is_translatable=>true
,p_help_text=>'Leave blank for default: "Address not found"'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196437117407656049)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'APPLICATION'
,p_attribute_sequence=>3
,p_display_sequence=>30
,p_prompt=>'Directions Not Found message'
,p_attribute_type=>'TEXT'
,p_is_required=>false
,p_is_translatable=>true
,p_help_text=>'Leave blank for default: "At least one of the origin, destination, or waypoints could not be geocoded."'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196437540290656049)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'APPLICATION'
,p_attribute_sequence=>4
,p_display_sequence=>40
,p_prompt=>'Directions Zero Results message'
,p_attribute_type=>'TEXT'
,p_is_required=>false
,p_is_translatable=>true
,p_help_text=>'Leave blank for default: "No route could be found between the origin and destination."'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196437906399656048)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'APPLICATION'
,p_attribute_sequence=>5
,p_display_sequence=>50
,p_prompt=>'Min. Zoom'
,p_attribute_type=>'INTEGER'
,p_is_required=>false
,p_default_value=>'1'
,p_unit=>'0 .. 23'
,p_is_translatable=>false
,p_help_text=>'Minimum Zoom Level - must be 0 to 23. Set to 0 to allow zooming out to entire world map.'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196438321239656048)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'APPLICATION'
,p_attribute_sequence=>6
,p_display_sequence=>60
,p_prompt=>'Max. Zoom'
,p_attribute_type=>'INTEGER'
,p_is_required=>false
,p_unit=>'0 .. 23'
,p_is_translatable=>false
,p_help_text=>'Maximum Zoom Level - 0 to 23. Set to blank to allow zooming in to show maximum detail.'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196438684803656048)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'APPLICATION'
,p_attribute_sequence=>7
,p_display_sequence=>70
,p_prompt=>'Maximum Records'
,p_attribute_type=>'INTEGER'
,p_is_required=>true
,p_default_value=>'10000'
,p_unit=>'rows'
,p_is_translatable=>false
,p_help_text=>'Maximum number of records to fetch from the SQL Query. Note that datasets that are very large (e.g. 10,000+) may perform poorly on the client''s machine. The Heatmap option is leaner and can support larger datasets.'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(84401048685750914)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'APPLICATION'
,p_attribute_sequence=>8
,p_display_sequence=>80
,p_prompt=>'Directions Unit System'
,p_attribute_type=>'SELECT LIST'
,p_is_required=>true
,p_default_value=>'METRIC'
,p_is_translatable=>false
,p_lov_type=>'STATIC'
,p_help_text=>'Unit system to use when using the Directions service.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(84411716230750227)
,p_plugin_attribute_id=>wwv_flow_api.id(84401048685750914)
,p_display_sequence=>10
,p_display_value=>'Metric'
,p_return_value=>'METRIC'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(84412130136749429)
,p_plugin_attribute_id=>wwv_flow_api.id(84401048685750914)
,p_display_sequence=>20
,p_display_value=>'Imperial'
,p_return_value=>'IMPERIAL'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(85316358723190558)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'APPLICATION'
,p_attribute_sequence=>9
,p_display_sequence=>90
,p_prompt=>'Plugin URL Path'
,p_attribute_type=>'TEXT'
,p_is_required=>false
,p_is_translatable=>false
,p_examples=>wwv_flow_string.join(wwv_flow_t_varchar2(
'https://xyzmyprefixxyz.adb.eu-frankfurt-1.oraclecloudapps.com/ords',
'https://apex.oracle.com/pls/apex'))
,p_help_text=>'Normally, this may be left blank (i.e. auto-detect). Set this to override the automatic detection of the window origin+path for downloading plugin image icons. Don''t include a trailing slash (/). The plugin will append the plugin path prefix and the '
||'file name at run time.'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196439145228656047)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'COMPONENT'
,p_attribute_sequence=>1
,p_display_sequence=>10
,p_prompt=>'Min. Map Height'
,p_attribute_type=>'NUMBER'
,p_is_required=>true
,p_show_in_wizard=>false
,p_default_value=>'400'
,p_unit=>'pixels'
,p_is_translatable=>false
,p_help_text=>'Desired height (in pixels) of the map region. Note: the width will adjust according to the available area of the containing window.'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196439489513656047)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'COMPONENT'
,p_attribute_sequence=>2
,p_display_sequence=>20
,p_prompt=>'Visualisation'
,p_attribute_type=>'SELECT LIST'
,p_is_required=>true
,p_default_value=>'PINS'
,p_is_translatable=>false
,p_lov_type=>'STATIC'
,p_help_text=>'Select how to represent the data retrieved from the query on the map.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(196439877093656047)
,p_plugin_attribute_id=>wwv_flow_api.id(196439489513656047)
,p_display_sequence=>10
,p_display_value=>'Pins'
,p_return_value=>'PINS'
,p_help_text=>'Show a pin for every data point. The pin may optionally use an alternative icon, or show a single-character label. Each pin can also have an information window showing text (most HTML allowed) when the user selects the pin.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(84901479713322267)
,p_plugin_attribute_id=>wwv_flow_api.id(196439489513656047)
,p_display_sequence=>15
,p_display_value=>'Info Layer'
,p_return_value=>'INFOLAYER'
,p_help_text=>'Show the Info (as HTML rendered within a div) directly on the map instead of pins.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(196440429855656047)
,p_plugin_attribute_id=>wwv_flow_api.id(196439489513656047)
,p_display_sequence=>20
,p_display_value=>'Marker Clustering'
,p_return_value=>'CLUSTER'
,p_help_text=>'Show a pin for every data point. Cluster pins where many pins are very close together. When the user clicks a cluster, the map zooms in to show the pins.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(108971242187567164)
,p_plugin_attribute_id=>wwv_flow_api.id(196439489513656047)
,p_display_sequence=>25
,p_display_value=>'Spiderfier'
,p_return_value=>'SPIDERFIER'
,p_help_text=>'Show a pin for every data point. If the user clicks on a group of pins that are close to each other or overlapping, the spiderfier shifts the pins out in a spiral with lines pointing to where they were.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(196440921401656046)
,p_plugin_attribute_id=>wwv_flow_api.id(196439489513656047)
,p_display_sequence=>30
,p_display_value=>'Heatmap'
,p_return_value=>'HEATMAP'
,p_help_text=>'Show the data as a heat map. Suitable for larger volume of data points. Note: a different query structure is required (i.e. no pin labels or icons are used).'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(196441374095656046)
,p_plugin_attribute_id=>wwv_flow_api.id(196439489513656047)
,p_display_sequence=>40
,p_display_value=>'Directions'
,p_return_value=>'DIRECTIONS'
,p_help_text=>'Show a route using the data points from the query. Directions can be shown for Driving, Walking, Bicycling or Public Transport. A pin will also be shown at each point.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(109740019544017974)
,p_plugin_attribute_id=>wwv_flow_api.id(196439489513656047)
,p_display_sequence=>50
,p_display_value=>'GeoJson'
,p_return_value=>'GEOJSON'
,p_help_text=>'Render one or more features represented in GeoJson format. Query only requires one column, the GeoJson document (VARCHAR2 or CLOB).'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196441895836656046)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'COMPONENT'
,p_attribute_sequence=>3
,p_display_sequence=>30
,p_prompt=>'Zoom Level on Click'
,p_attribute_type=>'INTEGER'
,p_is_required=>false
,p_show_in_wizard=>false
,p_default_value=>'13'
,p_unit=>'0 .. 23'
,p_is_translatable=>false
,p_help_text=>'When the user clicks on a map marker, or adds a new marker, zoom the map to this level. Set to blank to not zoom on click.'
);
wwv_flow_api.create_plugin_attribute(
p_id=>wwv_flow_api.id(196442290547656045)
,p_plugin_id=>wwv_flow_api.id(184856223301707224)
,p_attribute_scope=>'COMPONENT'
,p_attribute_sequence=>4
,p_display_sequence=>40
,p_prompt=>'Options'
,p_attribute_type=>'CHECKBOXES'
,p_is_required=>false
,p_default_value=>'PAN_ON_CLICK:PAN_ALLOWED:ZOOM_ALLOWED:SPINNER'
,p_is_translatable=>false
,p_lov_type=>'STATIC'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(196443113749656044)
,p_plugin_attribute_id=>wwv_flow_api.id(196442290547656045)
,p_display_sequence=>10
,p_display_value=>'Pan on click'
,p_return_value=>'PAN_ON_CLICK'
,p_help_text=>'When the user clicks a point on the map, pan the map to that location.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(196443628094656044)
,p_plugin_attribute_id=>wwv_flow_api.id(196442290547656045)
,p_display_sequence=>20
,p_display_value=>'Draggable pins'
,p_return_value=>'DRAGGABLE'
,p_help_text=>'Allow user to move pins to new locations on the map.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(196444071794656044)
,p_plugin_attribute_id=>wwv_flow_api.id(196442290547656045)
,p_display_sequence=>30
,p_display_value=>'Pan allowed'
,p_return_value=>'PAN_ALLOWED'
,p_help_text=>'Allow user to pan the map. If unset, the map will be fixed at one location.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(196444600766656043)
,p_plugin_attribute_id=>wwv_flow_api.id(196442290547656045)
,p_display_sequence=>40
,p_display_value=>'Zoom Allowed'
,p_return_value=>'ZOOM_ALLOWED'
,p_help_text=>'Allow user to zoom in or out. If unset, the map scale will remain constant.'
);
wwv_flow_api.create_plugin_attr_value(
p_id=>wwv_flow_api.id(196442580346656044)
,p_plugin_attribute_id=>wwv_flow_api.id(196442290547656045)
,p_display_sequence=>50
,p_display_value=>'Drag & Drop GeoJSON'
,p_return_value=>'GEOJSON_DRAGDROP'
,p_help_text=>wwv_flow_string.join(wwv_flow_t_varchar2(
'Allow user to drag and drop a GeoJSON file onto the map. The features in the GeoJSON will be rendered into a data layer on the map.',
'<p>',
'If you also enable Drawing Mode, the user will also be able to edit these features, and add and remove features.',
'<p>',
'You can get the resulting set of features as a new GeoJSON document using code like this:',
'<pre>',