@opengis/gis 0.1.81 → 0.2.0

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.
Files changed (39) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/index.js +5752 -6487
  3. package/dist/index.umd.cjs +39 -55
  4. package/module/gis/table/gis.group_list.table.json +36 -0
  5. package/module/test/cls/ts.temp_structure.ts_class.json +50 -0
  6. package/module/test/layer/bp.json +60 -0
  7. package/module/test/map/address/addr.yml +6 -0
  8. package/module/test/map/address/index.yml +22 -0
  9. package/module/test/map/address/street.yml +16 -0
  10. package/module/test/map/address2/addr.json +9 -0
  11. package/module/test/map/address2/index.json +35 -0
  12. package/module/test/map/address2/street.json +19 -0
  13. package/module/test/map/address3.yml +52 -0
  14. package/module/test/map/address4.json +34 -0
  15. package/module/test/map/bp_myo.json +37 -0
  16. package/module/test/map/main.json +44 -0
  17. package/module/test/map/mbd.json +91 -0
  18. package/module/test/map/ts.json +20 -129
  19. package/module/test/table/data_address.street.table.json +70 -0
  20. package/package.json +13 -11
  21. package/server/migrations/services.sql +3 -0
  22. package/server/migrations/widgets.sql +21 -0
  23. package/server/plugins/mapnik/funcs/map.proto +241 -241
  24. package/server/routes/gis/index.mjs +2 -0
  25. package/server/routes/gis/registers/funcs/classifiers.js +18 -3
  26. package/server/routes/gis/registers/funcs/handleRegistryRequest.js +4 -2
  27. package/server/routes/gis/services/add.service.js +51 -16
  28. package/server/routes/gis/services/get.services.js +28 -5
  29. package/server/routes/gis/services/legend.auto.js +78 -0
  30. package/server/routes/map/controllers/mapFormat.js +19 -10
  31. package/server/routes/map/controllers/marker_icon.js +2 -1
  32. package/server/routes/map/index.mjs +36 -15
  33. package/server/routes/map/maps/add.map.js +42 -0
  34. package/server/routes/map/maps/del.map.js +19 -0
  35. package/server/routes/map/maps/get.map.js +65 -0
  36. package/server/routes/map/vtile1.js +13 -4
  37. package/server/routes/map/widgets/add.widget.js +39 -0
  38. package/server/routes/map/widgets/del.widget.js +23 -0
  39. package/server/routes/map/widgets/get.widget.js +41 -0
@@ -1,152 +1,43 @@
1
1
  {
2
2
  "history": true,
3
- "height": "calc(100vh - 65px)",
4
- "source_path": "ts.temp_structure",
3
+ "height": "calc(100vh - 65px)",
4
+ "center": [
5
+ 34.65450,
6
+ 48.51174
7
+ ],
8
+ "zoom": 11,
9
+ "layers": ["ed67980cd690"],
5
10
  "widgets": [
6
11
  {
7
12
  "type": "info",
8
13
  "position": "top-left",
9
14
  "config": {
10
15
  "title": "Тимчасові споруди",
11
- "content": "<p style='font-size: 14px; color: #34495E;'>Інформація про тимчасові споруди встановлені на території м. Кам'янське</p>",
12
- "goTo": [
13
- {
14
- "label": "Карта адресного реєстру",
15
- "url": "/map/addr"
16
- },
17
- {
18
- "label": "Карта БП/МУО",
19
- "url": "/map/bp_myo"
20
- },
21
- {
22
- "label": "Карта містобудівної документації",
23
- "url": "/map/mbd"
24
- },
25
- {
26
- "label": "Основна карта",
27
- "url": "/map/main"
28
- }
29
- ]
16
+ "content": "<p style='font-size: 14px; color: #34495E;'>Інформація про тимчасові споруди встановлені на території м. Кам'янське</p>"
30
17
  }
31
18
  },
32
19
  {
33
- "type": "attribute",
20
+ "type": "dataset",
34
21
  "position": "top-left",
35
22
  "config": {
36
- "layer": {
37
- "id": "temp_structure",
38
- "service": "vtile",
39
- "service_key": "ts",
40
- "map_key": "ts",
41
- "visible": true,
42
- "url": "/api/vtile/ts.temp_structure/ua/{z}/{x}/{y}.vmt",
43
- "style": {
44
- "type": "polygon",
45
- "attrType": "icon-by-attribute",
46
- "attribute": "temp_structure_status",
47
- "default_icon": "pin6-l-fa-question+4767e6.png",
48
- "icon_base_url": "https://data.softpro.ua/api-user/markerIcon/",
49
- "icon_size": 1,
50
- "iconZoom": 14,
51
- "pointZoom": 14,
52
- "icon_anchor": "bottom",
53
- "rules": [
54
- {
55
- "value": "1",
56
- "label": "Діючий",
57
- "color": "#28a745",
58
- "icon": "pin6-l-fa-check+28a745.png"
59
- },
60
- {
61
- "value": "2",
62
- "label": "Анульований",
63
- "color": "#dc3545",
64
- "icon": "pin6-l-fa-exclamation+dc3545.png"
65
- },
66
- {
67
- "value": "3",
68
- "label": "Призупинений",
69
- "color": "#ffc107",
70
- "icon": "pin6-l-ty-lock-closed-outline+ffc107.png"
71
- },
72
- {
73
- "value": "4",
74
- "label": "Завершився термін дії",
75
- "color": "purple",
76
- "icon": "pin6-l-fa-clock-o+800080.png"
77
- }
78
- ],
79
- "popup": {
80
- "mode": "html",
81
- "title": "<strong>Тимчасова споруда</strong>",
82
- "fields": [
83
- {
84
- "label": "Назва",
85
- "value": "name"
86
- },
87
- {
88
- "label": "Кадастровий номер ЗД",
89
- "value": "cad_num"
90
- },
91
- {
92
- "label": "Площа тимчасової споруди, м. кв.",
93
- "value": "area"
94
- }
95
- ]
96
- }
97
- }
98
- }
23
+ "layer":"ed67980cd690",
24
+ "attribute":"status"
99
25
  }
100
26
  },
101
- {
102
- "type": "card",
103
- "position": "top-right",
104
- "config": {
105
- "title": "Інформація про об'єкт"
106
- }
27
+ {
28
+ "type": "layers",
29
+ "visible":false
30
+ },
31
+ {
32
+ "type": "legend",
33
+ "position":"bottom-right"
107
34
  },
108
35
  {
109
36
  "type": "basemaps",
110
37
  "position": "bottom-left",
111
- "title": "Базові карти",
112
- "config": {
113
- "default": "voyager",
114
- "layers": [
115
- {
116
- "id": "voyager",
117
- "title": "Базова карта (voyager)",
118
- "url": "https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",
119
- "service": "raster",
120
- "map_key": "ts",
121
- "service_key": "ts",
122
- "attribution": "&copy; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, &copy; <a href='https://carto.com/attributions'>CARTO</a>",
123
- "image": "https://data.gki.com.ua/api-user/rtile/voyager/ua/12/2422/1400.png",
124
- "owner": "OSM",
125
- "basemap": true
126
- },
127
- {
128
- "id": "esri",
129
- "title": "ESRI Online Imagery(2022-2023)",
130
- "url": "https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}.png",
131
- "service": "raster",
132
- "image": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/7/47/69.png"
133
- }
134
- ]
135
- },
136
- "visible": true
137
- }
138
- ],
139
- "interactions": {
140
- "hover": {
141
- "enabled": true
142
- },
143
- "navigation": {
144
- "enabled": true
145
- },
146
- "click": {
147
- "enabled": true
38
+ "title": "Базові карти"
148
39
  }
149
- },
40
+ ],
150
41
  "tools": [
151
42
  "home",
152
43
  "geolocation",
@@ -0,0 +1,70 @@
1
+ {
2
+ "key": "str_id",
3
+ "table": "data_address.street",
4
+ "controls": [
5
+ "search",
6
+ "list",
7
+ "add"
8
+ ],
9
+ "form": "data_address.street.form",
10
+ "access": "user",
11
+ "sqlColumns": "*",
12
+ "order": "cdate desc",
13
+ "columns": [
14
+ {
15
+ "ua": "Назва вулиці",
16
+ "meta": "title",
17
+ "name": "name",
18
+ "format": "text"
19
+ },
20
+ {
21
+ "ua": "Статус",
22
+ "name": "status",
23
+ "data": "address.status",
24
+ "format": "select"
25
+ },
26
+ {
27
+ "ua": "Тип об'єкта",
28
+ "name": "type",
29
+ "data": "str_type",
30
+ "format": "select"
31
+ },
32
+ {
33
+ "ua": "Територіальна належність",
34
+ "name": "parent",
35
+ "data": "address.atu.object_id_all",
36
+ "width": 300,
37
+ "format": "select"
38
+ },
39
+ {
40
+ "ua": "Довжина вулиці",
41
+ "name": "str_length",
42
+ "html": "{{num_format str_length dec='2'}}",
43
+ "format": "number"
44
+ },
45
+ {
46
+ "ua": "Версія",
47
+ "name": "version",
48
+ "format": "text"
49
+ }
50
+ ],
51
+ "meta": {
52
+ "search": "name",
53
+ "title": "name"
54
+ },
55
+ "ua": "Вулиці",
56
+ "filterList": [
57
+ {
58
+ "ua": "Тип об'єкта",
59
+ "name": "type",
60
+ "data": "str_type",
61
+ "type": "Autocomplete"
62
+ },
63
+ {
64
+ "ua": "Статус",
65
+ "name": "status",
66
+ "data": "address.status",
67
+ "type": "Autocomplete"
68
+ }
69
+ ]
70
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengis/gis",
3
- "version": "0.1.81",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "author": "Softpro",
6
6
  "main": "./dist/index.js",
@@ -15,8 +15,9 @@
15
15
  "LICENSE"
16
16
  ],
17
17
  "scripts": {
18
+ "start1": "bun server",
18
19
  "patch": "npm version patch && git push && npm publish",
19
- "dev": "node server",
20
+ "dev": "bun --hot server",
20
21
  "front": "vite dev",
21
22
  "build-lib": "vite build",
22
23
  "build:admin": "vite build admin",
@@ -34,26 +35,27 @@
34
35
  "carto": "0.16.3"
35
36
  },
36
37
  "peerDependencies": {
37
- "@opengis/fastify-table": "^1.5.4"
38
+ "@opengis/fastify-table": "^2.0.13"
39
+ },
40
+ "resolutions": {
41
+ "rollup": "4.30.0"
38
42
  },
39
43
  "devDependencies": {
40
- "yaml": "2.8.1",
41
- "@opengis/form": "^0.0.28",
42
44
  "@opengis/core": "^0.0.23",
43
- "@opengis/fastify-auth": "^1.1.22",
44
- "@opengis/fastify-table": "^1.5.4",
45
+ "@opengis/fastify-table": "^2.0.13",
45
46
  "@opengis/filter": "^0.1.7",
47
+ "@opengis/form": "^0.0.28",
48
+ "@opengis/table": "^0.0.27",
46
49
  "@vitejs/plugin-vue": "^5.2.3",
47
50
  "axios": "^1.11.0",
48
51
  "eslint": "8.49.0",
49
52
  "eslint-config-airbnb": "19.0.4",
50
53
  "lucide-vue-next": "^0.514.0",
51
54
  "sass-embedded": "1.86.3",
55
+ "typescript": "^5.9.2",
52
56
  "vite": "^6.3.5",
53
57
  "vue": "^3.5.13",
54
58
  "vue-router": "4.5.1",
55
- "vuedraggable": "^4.1.0",
56
- "typescript": "^5.9.2",
57
- "@opengis/table": "^0.0.27"
59
+ "vuedraggable": "^4.1.0"
58
60
  }
59
- }
61
+ }
@@ -49,6 +49,9 @@ CREATE TABLE if not exists gis.services
49
49
  REFERENCES gis.group_list (group_id)
50
50
  );
51
51
 
52
+ alter table gis.services add column if not exists template text;
53
+ comment on column gis.services.template is 'Назва шаблону';
54
+
52
55
  DROP INDEX if exists gis.gis_services_category_gin_idx;
53
56
 
54
57
  CREATE INDEX gis_services_category_gin_idx
@@ -0,0 +1,21 @@
1
+ create schema if not exists gis;
2
+
3
+ CREATE TABLE if not exists gis.widgets
4
+ (
5
+ widget_id text NOT NULL DEFAULT next_id(),
6
+ map_id text NOT NULL,
7
+ name text,
8
+ type text NOT NULL,
9
+ title text,
10
+ position text,
11
+ config jsonb,
12
+ created_by text NOT NULL,
13
+ updated_by text,
14
+ updated_at timestamp without time zone,
15
+ created_at timestamp without time zone NOT NULL DEFAULT now(),
16
+ CONSTRAINT widgets_pkey PRIMARY KEY (widget_id),
17
+ CONSTRAINT widgets_map_id_fkey FOREIGN KEY (map_id)
18
+ REFERENCES gis.maps (map_id)
19
+ );
20
+
21
+ COMMENT ON TABLE gis.widgets IS 'Map widgets';