Last modified by jhurst on 2021/04/21 10:01

Show last authors
1 This document provides the information necessary to create additional maps in DigDash Enterprise.
2
3 {{ddtoc/}}
4
5 A set of files is provided by DigDash to allow the creation of these cards:
6
7 * map_name_helper_v6.xlsm
8 * mapchart1-template-dashboard_canvas.html
9 * mapchart1-template-dashboard_svg.svg
10 * mapchart1-template-dashboard_vml.html
11 * vectortool.jar
12 * convert_maps_dbf.bat
13 * convert_maps.bat
14
15 These files are located in the add-ons / custommap directory.
16
17 If you wish to import your maps from GIS, an importfromgis.jar file can also be provided to you (contact us by email at [[support@digdash.com>>path:mailto:support@digdash.com]] ).
18
19 *
20
21 = Importing Maps from GIS =
22
23 You can import your existing maps (shp files) using the command
24
25 java -jar importfromgis.jar -i inputfile.shp -o output.svg
26
27 Replace **inputfile.shp** with the name of your shp file and **output.svg** with the name of your output svg file.
28
29 (% class="box warningmessage" %)
30 (((
31 //Warning: you must place your inputfile.shx file in the same directory as inputfile.shp//
32 )))
33
34 = card configuration =
35
36 We recommend using the **map_name_helper_v6.xlsm** file .
37
38 Insert the different elements of your card in the **src** sheet (one element per line, overwrite the 1st line of the file)
39
40 The 1st column must contain the element's id (the id must be prefixed with the country code like FR for France.)
41
42 The second column should contain the name of the element from your dbf file.
43
44 == Modifying the card definition file ==
45
46 Edit the **apache-tomcat \ webapps \ ddenterpriseapi \ WEB-INF \ classes \ resources \ config \ mapworld-data.xml file**
47
48 Add the contents of the sheet **maplist.xml ** file ** map_name_helper_v6.xlsm ** in ** MapWorld-data.xml** .
49
50 Attention: Attach your **<item ...>** sections to the correct parent.
51
52 Format of the “item” section:
53
54 * id: (required) id used in the SVG card.
55 * names: (optional) name of the file (.properties) containing the translations or variants for this id.
56 * map: (optional) "no" when the element cannot be explored.
57
58 == Create your ID mapping files ==
59
60 This optional file will allow you to find the different correspondences between the id used in the maps and your root members in the geographic dimension.
61
62 Copy the content of the **-names.js** sheet obtained in the **map_name_helper_v6.xlsm ** file into a file called **<id_carte> -l1-names, js ** .
63
64 This file must be copied in 3 different folders:
65
66 * apache-tomcat\webapps\ddenterpriseapi\staticwebcontent\charts\template\
67 scripts\mapnames\
68 * apache-tomcat\webapps\digdash_dashboard\staticwebcontent\charts\template\
69 scripts\mapnames\
70 * apache-tomcat\webapps\ddenterpriseapi\WEB-INF\classes\resources
71 \charts\template\scripts\mapnames
72
73 For each of these 3 folders, place the card in the sub-directory corresponding to the parent card.
74
75 == Create your translation files ==
76
77 This optional file will allow you to find the different translations for the areas displayed on the map.
78
79 Copy the content of the **.properties** sheet obtained in the **map_name_helper_v6.xlsm ** file to the following location:
80
81 apache-tomcat\webapps\ddenterpriseapi\WEB-INF\classes\messages\<parentmap_or_specific>.properties
82
83 Warning :
84
85 (% class="box warningmessage" %)
86 (((
87 * Check the name of the parent **.properties** file in **mapworld-data.xml** .
88 * Add your own **.properties** files or the parent may be overwritten during the next product update.
89 )))
90
91 = Generation of map graphics files =
92
93 Program required:
94
95 * vectortool.jar **  **(provided by DigDash, requires a jre)
96
97 Required files:
98
99 * mapchart1-template-dashboard_canvas.html
100 * mapchart1-template-dashboard_svg.svg
101 * mapchart1-template-dashboard_vml.html
102
103 Scripts required:
104
105 * convert_maps_dbf.bat: .dbf files, including the com of card components are often provided with Shapefiles. Using the convert_maps_dbf.bat script allows you to associate the Ids of dbf to SVG forms in order.
106
107 * //Or// convert_map.bat: if you are not using dbf files
108
109 Change the variables in the script file according to your settings.
110
111 Run the convert_maps_dbf.bat or convert_maps.bat script.
112
113 = Deployment of CARDS =
114
115 Copy the content of the **output** folder generated in step III in:
116
117 * apache-tomcat\webapps\ddenterpriseapi\staticwebcontent\charts\template\
118 * apache-tomcat\webapps\digdash_dashboard\staticwebcontent\charts\template\
119 * apache-tomcat\webapps\ddenterpriseapi\WEB-INF\classes\resources\charts\template\
120
121