@cowegis/client 1.0.0-alpha4 → 1.0.0-alpha5
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/.editorconfig +17 -0
- package/.eslintrc.js +31 -0
- package/.idea/encodings.xml +6 -0
- package/.idea/misc.xml +72 -0
- package/.idea/workspace.xml +219 -0
- package/js/Registry.js +1 -1
- package/js/assets/AssetsLoader.js +14 -11
- package/js/bundle.js +13 -16
- package/js/client.js +5 -6
- package/js/control/attributionControlFactory.js +1 -1
- package/js/control/geocoderControlFactory.js +10 -3
- package/js/control/index.js +1 -1
- package/js/control/loadingControlFactory.js +1 -1
- package/js/control/scaleControlFactory.js +1 -1
- package/js/control/zoomControlFactory.js +1 -1
- package/js/element/EditorElement.js +1 -1
- package/js/element/MapElement.js +2 -2
- package/js/factory/MapFactory.js +7 -19
- package/js/factory/index.js +1 -1
- package/js/geocoder/Cowegis.js +77 -0
- package/js/geojson/bindPopupFromFeature.js +1 -1
- package/js/geojson/bindTooltipFromFeature.js +1 -1
- package/js/geojson/index.js +1 -1
- package/js/geojson/pointToLayer.js +4 -3
- package/js/icon/FontAwesomeIcon.js +3 -2
- package/js/icon/divIconFactory.js +1 -2
- package/js/icon/fontAwesomeIconFactory.js +3 -2
- package/js/icon/imageIconFactory.js +1 -1
- package/js/icon/index.js +1 -1
- package/js/icon/svgIconFactory.js +3 -2
- package/js/layer/OverpassLayer.js +4 -3
- package/js/layer/dataLayerFactory.js +6 -6
- package/js/layer/featureGroupFactory.js +1 -0
- package/js/layer/overpassLayerFactory.js +1 -1
- package/js/leaflet/index.js +3 -2
- package/package.json +24 -13
package/.editorconfig
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
indent_style = space
|
|
6
|
+
end_of_line = lf
|
|
7
|
+
insert_final_newline = true
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
|
|
10
|
+
[*.php]
|
|
11
|
+
indent_size = 4
|
|
12
|
+
|
|
13
|
+
[*.js]
|
|
14
|
+
indent_size = 4
|
|
15
|
+
|
|
16
|
+
[{*.vue,*.json,*.html5,*.xlf,*.twig}]
|
|
17
|
+
indent_size = 2
|
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: '@babel/eslint-parser',
|
|
3
|
+
parserOptions: {
|
|
4
|
+
sourceType: 'module',
|
|
5
|
+
allowImportExportEverywhere: true,
|
|
6
|
+
requireConfigFile: false,
|
|
7
|
+
},
|
|
8
|
+
extends: [
|
|
9
|
+
'plugin:import/recommended'
|
|
10
|
+
],
|
|
11
|
+
rules: {
|
|
12
|
+
"quotes": [2, "single", "avoid-escape"],
|
|
13
|
+
"import/order": ["error", {
|
|
14
|
+
groups: ["builtin", "external", "internal", "parent", "sibling", "index", "object", "type"],
|
|
15
|
+
"newlines-between": "always",
|
|
16
|
+
alphabetize: {
|
|
17
|
+
order: "asc"
|
|
18
|
+
}
|
|
19
|
+
}],
|
|
20
|
+
},
|
|
21
|
+
settings: {
|
|
22
|
+
"import/extensions": [
|
|
23
|
+
".js",
|
|
24
|
+
],
|
|
25
|
+
'import/resolver': {
|
|
26
|
+
typescript: {},
|
|
27
|
+
webpack: {}
|
|
28
|
+
},
|
|
29
|
+
"import/ignore": ["/*.png/", "/*.jpg/"]
|
|
30
|
+
}
|
|
31
|
+
}
|
package/.idea/misc.xml
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="MarkdownProjectSettings">
|
|
4
|
+
<PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.0" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true">
|
|
5
|
+
<PanelProvider>
|
|
6
|
+
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
|
|
7
|
+
</PanelProvider>
|
|
8
|
+
</PreviewSettings>
|
|
9
|
+
<ParserSettings gitHubSyntaxChange="false">
|
|
10
|
+
<PegdownExtensions>
|
|
11
|
+
<option name="ABBREVIATIONS" value="false" />
|
|
12
|
+
<option name="ANCHORLINKS" value="true" />
|
|
13
|
+
<option name="ASIDE" value="false" />
|
|
14
|
+
<option name="ATXHEADERSPACE" value="true" />
|
|
15
|
+
<option name="AUTOLINKS" value="true" />
|
|
16
|
+
<option name="DEFINITIONS" value="false" />
|
|
17
|
+
<option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
|
|
18
|
+
<option name="FENCED_CODE_BLOCKS" value="true" />
|
|
19
|
+
<option name="FOOTNOTES" value="false" />
|
|
20
|
+
<option name="HARDWRAPS" value="false" />
|
|
21
|
+
<option name="HTML_DEEP_PARSER" value="false" />
|
|
22
|
+
<option name="INSERTED" value="false" />
|
|
23
|
+
<option name="QUOTES" value="false" />
|
|
24
|
+
<option name="RELAXEDHRULES" value="true" />
|
|
25
|
+
<option name="SMARTS" value="false" />
|
|
26
|
+
<option name="STRIKETHROUGH" value="true" />
|
|
27
|
+
<option name="SUBSCRIPT" value="false" />
|
|
28
|
+
<option name="SUPERSCRIPT" value="false" />
|
|
29
|
+
<option name="SUPPRESS_HTML_BLOCKS" value="false" />
|
|
30
|
+
<option name="SUPPRESS_INLINE_HTML" value="false" />
|
|
31
|
+
<option name="TABLES" value="true" />
|
|
32
|
+
<option name="TASKLISTITEMS" value="true" />
|
|
33
|
+
<option name="TOC" value="false" />
|
|
34
|
+
<option name="WIKILINKS" value="true" />
|
|
35
|
+
</PegdownExtensions>
|
|
36
|
+
<ParserOptions>
|
|
37
|
+
<option name="COMMONMARK_LISTS" value="true" />
|
|
38
|
+
<option name="DUMMY" value="false" />
|
|
39
|
+
<option name="EMOJI_SHORTCUTS" value="true" />
|
|
40
|
+
<option name="FLEXMARK_FRONT_MATTER" value="false" />
|
|
41
|
+
<option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
|
|
42
|
+
<option name="GFM_TABLE_RENDERING" value="true" />
|
|
43
|
+
<option name="GITBOOK_URL_ENCODING" value="false" />
|
|
44
|
+
<option name="GITHUB_EMOJI_URL" value="false" />
|
|
45
|
+
<option name="GITHUB_LISTS" value="false" />
|
|
46
|
+
<option name="GITHUB_WIKI_LINKS" value="true" />
|
|
47
|
+
<option name="JEKYLL_FRONT_MATTER" value="false" />
|
|
48
|
+
<option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
|
|
49
|
+
</ParserOptions>
|
|
50
|
+
</ParserSettings>
|
|
51
|
+
<HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true">
|
|
52
|
+
<GeneratorProvider>
|
|
53
|
+
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
|
|
54
|
+
</GeneratorProvider>
|
|
55
|
+
<headerTop />
|
|
56
|
+
<headerBottom />
|
|
57
|
+
<bodyTop />
|
|
58
|
+
<bodyBottom />
|
|
59
|
+
</HtmlSettings>
|
|
60
|
+
<CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
|
|
61
|
+
<StylesheetProvider>
|
|
62
|
+
<provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
|
|
63
|
+
</StylesheetProvider>
|
|
64
|
+
<ScriptProviders />
|
|
65
|
+
<cssText />
|
|
66
|
+
</CssSettings>
|
|
67
|
+
<HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" />
|
|
68
|
+
<LinkMapSettings>
|
|
69
|
+
<textMaps />
|
|
70
|
+
</LinkMapSettings>
|
|
71
|
+
</component>
|
|
72
|
+
</project>
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ChangeListManager">
|
|
4
|
+
<list default="true" id="4f4e2f64-e191-4537-a279-954eb5fcd9d1" name="Default Changelist" comment="Support cowegis specific geocoder">
|
|
5
|
+
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
|
|
6
|
+
</list>
|
|
7
|
+
<option name="SHOW_DIALOG" value="false" />
|
|
8
|
+
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
9
|
+
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
10
|
+
<option name="LAST_RESOLUTION" value="IGNORE" />
|
|
11
|
+
</component>
|
|
12
|
+
<component name="ComposerSettings">
|
|
13
|
+
<execution />
|
|
14
|
+
</component>
|
|
15
|
+
<component name="Git.Settings">
|
|
16
|
+
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
|
17
|
+
</component>
|
|
18
|
+
<component name="MarkdownSettingsMigration">
|
|
19
|
+
<option name="stateVersion" value="1" />
|
|
20
|
+
</component>
|
|
21
|
+
<component name="ProjectId" id="1lPd5Rd1FzoCoN9GW39SG9vAl0i" />
|
|
22
|
+
<component name="ProjectViewState">
|
|
23
|
+
<option name="autoscrollFromSource" value="true" />
|
|
24
|
+
<option name="hideEmptyMiddlePackages" value="true" />
|
|
25
|
+
<option name="showLibraryContents" value="true" />
|
|
26
|
+
</component>
|
|
27
|
+
<component name="PropertiesComponent">{
|
|
28
|
+
"keyToString": {
|
|
29
|
+
"WebServerToolWindowFactoryState": "true",
|
|
30
|
+
"last_opened_file_path": "/home/netzmacht/Daten/Projekte/Entwicklung/vcs/cowegis/client",
|
|
31
|
+
"nodejs_package_manager_path": "npm",
|
|
32
|
+
"ts.external.directory.path": "/home/netzmacht/.local/share/Jetbrain/Toolbox/apps/PhpStorm/ch-1/222.3345.21/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external",
|
|
33
|
+
"vue.rearranger.settings.migration": "true"
|
|
34
|
+
}
|
|
35
|
+
}</component>
|
|
36
|
+
<component name="RecentsManager">
|
|
37
|
+
<key name="CopyFile.RECENT_KEYS">
|
|
38
|
+
<recent name="$PROJECT_DIR$" />
|
|
39
|
+
</key>
|
|
40
|
+
</component>
|
|
41
|
+
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
|
42
|
+
<component name="TaskManager">
|
|
43
|
+
<task active="true" id="Default" summary="Default task">
|
|
44
|
+
<changelist id="4f4e2f64-e191-4537-a279-954eb5fcd9d1" name="Default Changelist" comment="" />
|
|
45
|
+
<created>1607502477309</created>
|
|
46
|
+
<option name="number" value="Default" />
|
|
47
|
+
<option name="presentableId" value="Default" />
|
|
48
|
+
<updated>1607502477309</updated>
|
|
49
|
+
<workItem from="1607502478638" duration="15482000" />
|
|
50
|
+
<workItem from="1607583781834" duration="2299000" />
|
|
51
|
+
<workItem from="1607630780676" duration="256000" />
|
|
52
|
+
<workItem from="1607631147778" duration="599000" />
|
|
53
|
+
<workItem from="1607930427851" duration="567000" />
|
|
54
|
+
<workItem from="1608016092709" duration="1494000" />
|
|
55
|
+
<workItem from="1608102566031" duration="2779000" />
|
|
56
|
+
<workItem from="1620303767826" duration="606000" />
|
|
57
|
+
<workItem from="1620373588333" duration="1053000" />
|
|
58
|
+
<workItem from="1620632775758" duration="504000" />
|
|
59
|
+
<workItem from="1623656700243" duration="489000" />
|
|
60
|
+
<workItem from="1657892545700" duration="3489000" />
|
|
61
|
+
<workItem from="1658130324079" duration="9160000" />
|
|
62
|
+
<workItem from="1658219737066" duration="4425000" />
|
|
63
|
+
<workItem from="1658318706225" duration="540000" />
|
|
64
|
+
<workItem from="1658996260630" duration="477000" />
|
|
65
|
+
<workItem from="1659087113490" duration="558000" />
|
|
66
|
+
<workItem from="1659343419204" duration="503000" />
|
|
67
|
+
<workItem from="1659425845219" duration="556000" />
|
|
68
|
+
<workItem from="1659511872197" duration="533000" />
|
|
69
|
+
<workItem from="1660824998023" duration="1306000" />
|
|
70
|
+
<workItem from="1661156987656" duration="587000" />
|
|
71
|
+
<workItem from="1661241522193" duration="586000" />
|
|
72
|
+
<workItem from="1661324372909" duration="577000" />
|
|
73
|
+
<workItem from="1661410853865" duration="581000" />
|
|
74
|
+
<workItem from="1662365599562" duration="593000" />
|
|
75
|
+
<workItem from="1662444044758" duration="571000" />
|
|
76
|
+
<workItem from="1662531796725" duration="588000" />
|
|
77
|
+
<workItem from="1662617852816" duration="703000" />
|
|
78
|
+
</task>
|
|
79
|
+
<task id="LOCAL-00001" summary="Update dependencies">
|
|
80
|
+
<created>1607504510222</created>
|
|
81
|
+
<option name="number" value="00001" />
|
|
82
|
+
<option name="presentableId" value="LOCAL-00001" />
|
|
83
|
+
<option name="project" value="LOCAL" />
|
|
84
|
+
<updated>1607504510222</updated>
|
|
85
|
+
</task>
|
|
86
|
+
<task id="LOCAL-00002" summary="Bump dependencies">
|
|
87
|
+
<created>1607524651927</created>
|
|
88
|
+
<option name="number" value="00002" />
|
|
89
|
+
<option name="presentableId" value="LOCAL-00002" />
|
|
90
|
+
<option name="project" value="LOCAL" />
|
|
91
|
+
<updated>1607524651927</updated>
|
|
92
|
+
</task>
|
|
93
|
+
<task id="LOCAL-00003" summary="Update package.json">
|
|
94
|
+
<created>1607524987811</created>
|
|
95
|
+
<option name="number" value="00003" />
|
|
96
|
+
<option name="presentableId" value="LOCAL-00003" />
|
|
97
|
+
<option name="project" value="LOCAL" />
|
|
98
|
+
<updated>1607524987811</updated>
|
|
99
|
+
</task>
|
|
100
|
+
<task id="LOCAL-00004" summary="Fix version">
|
|
101
|
+
<created>1607584710305</created>
|
|
102
|
+
<option name="number" value="00004" />
|
|
103
|
+
<option name="presentableId" value="LOCAL-00004" />
|
|
104
|
+
<option name="project" value="LOCAL" />
|
|
105
|
+
<updated>1607584710305</updated>
|
|
106
|
+
</task>
|
|
107
|
+
<task id="LOCAL-00005" summary="Export some symbols">
|
|
108
|
+
<created>1607588025747</created>
|
|
109
|
+
<option name="number" value="00005" />
|
|
110
|
+
<option name="presentableId" value="LOCAL-00005" />
|
|
111
|
+
<option name="project" value="LOCAL" />
|
|
112
|
+
<updated>1607588025747</updated>
|
|
113
|
+
</task>
|
|
114
|
+
<task id="LOCAL-00006" summary="Bump version">
|
|
115
|
+
<created>1607588092290</created>
|
|
116
|
+
<option name="number" value="00006" />
|
|
117
|
+
<option name="presentableId" value="LOCAL-00006" />
|
|
118
|
+
<option name="project" value="LOCAL" />
|
|
119
|
+
<updated>1607588092290</updated>
|
|
120
|
+
</task>
|
|
121
|
+
<task id="LOCAL-00007" summary="Add eslint">
|
|
122
|
+
<created>1657896356650</created>
|
|
123
|
+
<option name="number" value="00007" />
|
|
124
|
+
<option name="presentableId" value="LOCAL-00007" />
|
|
125
|
+
<option name="project" value="LOCAL" />
|
|
126
|
+
<updated>1657896356650</updated>
|
|
127
|
+
</task>
|
|
128
|
+
<task id="LOCAL-00008" summary="Run eslint">
|
|
129
|
+
<created>1657896468316</created>
|
|
130
|
+
<option name="number" value="00008" />
|
|
131
|
+
<option name="presentableId" value="LOCAL-00008" />
|
|
132
|
+
<option name="project" value="LOCAL" />
|
|
133
|
+
<updated>1657896468316</updated>
|
|
134
|
+
</task>
|
|
135
|
+
<task id="LOCAL-00009" summary="Bump requirements">
|
|
136
|
+
<created>1658135599828</created>
|
|
137
|
+
<option name="number" value="00009" />
|
|
138
|
+
<option name="presentableId" value="LOCAL-00009" />
|
|
139
|
+
<option name="project" value="LOCAL" />
|
|
140
|
+
<updated>1658135599828</updated>
|
|
141
|
+
</task>
|
|
142
|
+
<task id="LOCAL-00010" summary="Fix registry">
|
|
143
|
+
<created>1658135606619</created>
|
|
144
|
+
<option name="number" value="00010" />
|
|
145
|
+
<option name="presentableId" value="LOCAL-00010" />
|
|
146
|
+
<option name="project" value="LOCAL" />
|
|
147
|
+
<updated>1658135606619</updated>
|
|
148
|
+
</task>
|
|
149
|
+
<task id="LOCAL-00011" summary="Panes are not created async">
|
|
150
|
+
<created>1658135795615</created>
|
|
151
|
+
<option name="number" value="00011" />
|
|
152
|
+
<option name="presentableId" value="LOCAL-00011" />
|
|
153
|
+
<option name="project" value="LOCAL" />
|
|
154
|
+
<updated>1658135795615</updated>
|
|
155
|
+
</task>
|
|
156
|
+
<task id="LOCAL-00012" summary="Listeners are determined by bindEvents">
|
|
157
|
+
<created>1658135828697</created>
|
|
158
|
+
<option name="number" value="00012" />
|
|
159
|
+
<option name="presentableId" value="LOCAL-00012" />
|
|
160
|
+
<option name="project" value="LOCAL" />
|
|
161
|
+
<updated>1658135828697</updated>
|
|
162
|
+
</task>
|
|
163
|
+
<task id="LOCAL-00013" summary="Support dynamic registered components">
|
|
164
|
+
<created>1658136236721</created>
|
|
165
|
+
<option name="number" value="00013" />
|
|
166
|
+
<option name="presentableId" value="LOCAL-00013" />
|
|
167
|
+
<option name="project" value="LOCAL" />
|
|
168
|
+
<updated>1658136236721</updated>
|
|
169
|
+
</task>
|
|
170
|
+
<task id="LOCAL-00014" summary="Implement support for custom geocoders">
|
|
171
|
+
<created>1658144798217</created>
|
|
172
|
+
<option name="number" value="00014" />
|
|
173
|
+
<option name="presentableId" value="LOCAL-00014" />
|
|
174
|
+
<option name="project" value="LOCAL" />
|
|
175
|
+
<updated>1658144798217</updated>
|
|
176
|
+
</task>
|
|
177
|
+
<task id="LOCAL-00015" summary="Support cowegis specific geocoder">
|
|
178
|
+
<created>1658233028814</created>
|
|
179
|
+
<option name="number" value="00015" />
|
|
180
|
+
<option name="presentableId" value="LOCAL-00015" />
|
|
181
|
+
<option name="project" value="LOCAL" />
|
|
182
|
+
<updated>1658233028814</updated>
|
|
183
|
+
</task>
|
|
184
|
+
<option name="localTasksCounter" value="16" />
|
|
185
|
+
<servers />
|
|
186
|
+
</component>
|
|
187
|
+
<component name="TypeScriptGeneratedFilesManager">
|
|
188
|
+
<option name="version" value="3" />
|
|
189
|
+
</component>
|
|
190
|
+
<component name="Vcs.Log.Tabs.Properties">
|
|
191
|
+
<option name="TAB_STATES">
|
|
192
|
+
<map>
|
|
193
|
+
<entry key="MAIN">
|
|
194
|
+
<value>
|
|
195
|
+
<State />
|
|
196
|
+
</value>
|
|
197
|
+
</entry>
|
|
198
|
+
</map>
|
|
199
|
+
</option>
|
|
200
|
+
</component>
|
|
201
|
+
<component name="VcsManagerConfiguration">
|
|
202
|
+
<MESSAGE value="Update dependencies" />
|
|
203
|
+
<MESSAGE value="Bump dependencies" />
|
|
204
|
+
<MESSAGE value="Update package.json" />
|
|
205
|
+
<MESSAGE value="Fix version" />
|
|
206
|
+
<MESSAGE value="Export some symbols" />
|
|
207
|
+
<MESSAGE value="Bump version" />
|
|
208
|
+
<MESSAGE value="Add eslint" />
|
|
209
|
+
<MESSAGE value="Run eslint" />
|
|
210
|
+
<MESSAGE value="Bump requirements" />
|
|
211
|
+
<MESSAGE value="Fix registry" />
|
|
212
|
+
<MESSAGE value="Panes are not created async" />
|
|
213
|
+
<MESSAGE value="Listeners are determined by bindEvents" />
|
|
214
|
+
<MESSAGE value="Support dynamic registered components" />
|
|
215
|
+
<MESSAGE value="Implement support for custom geocoders" />
|
|
216
|
+
<MESSAGE value="Support cowegis specific geocoder" />
|
|
217
|
+
<option name="LAST_COMMIT_MESSAGE" value="Support cowegis specific geocoder" />
|
|
218
|
+
</component>
|
|
219
|
+
</project>
|
package/js/Registry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import layerTypes from '../layer';
|
|
2
1
|
import controlTypes from '../control';
|
|
2
|
+
import layerTypes from '../layer';
|
|
3
3
|
|
|
4
4
|
class AssetsLoader {
|
|
5
5
|
constructor(element) {
|
|
@@ -29,16 +29,19 @@ class AssetsLoader {
|
|
|
29
29
|
|
|
30
30
|
case 'component':
|
|
31
31
|
return import(/* webpackIgnore: true */ asset.url).then(function (component) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
switch (component.type) {
|
|
33
|
+
case 'layer':
|
|
34
|
+
this.layerTypes.register(component.name, component.factory);
|
|
35
|
+
break;
|
|
36
|
+
|
|
37
|
+
case 'control':
|
|
38
|
+
this.controlTypes.register(component.name, component.factory);
|
|
39
|
+
break;
|
|
40
|
+
|
|
41
|
+
default:
|
|
42
|
+
throw new Error('Unsupported component provided');
|
|
43
|
+
}
|
|
44
|
+
}.bind(this));
|
|
42
45
|
|
|
43
46
|
default:
|
|
44
47
|
throw new Error('Unsupported asset type ' + asset.type);
|
package/js/bundle.js
CHANGED
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
import {layerTypes, iconTypes, controlTypes, mapFactory} from './client';
|
|
2
|
-
|
|
3
|
-
import dataLayerFactory from './layer/dataLayerFactory';
|
|
4
|
-
import featureGroupFactory from "./layer/featureGroupFactory";
|
|
5
|
-
import layerGroupFactory from "./layer/layerGroupFactory";
|
|
6
|
-
import markerClusterGroupFactory from "./layer/markerClusterGroupFactory";
|
|
7
|
-
import overpassLayerFactory from "./layer/overpassLayerFactory";
|
|
8
|
-
import providerLayerFactory from './layer/providerLayerFactory';
|
|
9
|
-
import tileLayerFactory from './layer/tileLayerFactory';
|
|
10
|
-
|
|
11
|
-
import attributionControlFactory from "./control/attributionControlFactory";
|
|
2
|
+
import attributionControlFactory from './control/attributionControlFactory';
|
|
12
3
|
import fullscreenControlFactory from './control/fullscreenControlFactory';
|
|
13
|
-
import geocoderControlFactory from
|
|
14
|
-
import layersControlFactory from
|
|
4
|
+
import geocoderControlFactory from './control/geocoderControlFactory';
|
|
5
|
+
import layersControlFactory from './control/layersControlFactory';
|
|
15
6
|
import loadingControlFactory from './control/loadingControlFactory';
|
|
16
7
|
import scaleControlFactory from './control/scaleControlFactory';
|
|
17
8
|
import zoomControlFactory from './control/zoomControlFactory';
|
|
18
|
-
|
|
19
|
-
import
|
|
20
|
-
import fontAwesomeIconFactory from "./icon/fontAwesomeIconFactory";
|
|
9
|
+
import divIconFactory from './icon/divIconFactory';
|
|
10
|
+
import fontAwesomeIconFactory from './icon/fontAwesomeIconFactory';
|
|
21
11
|
import imageIconFactory from './icon/imageIconFactory';
|
|
22
|
-
import svgIconFactory from
|
|
12
|
+
import svgIconFactory from './icon/svgIconFactory';
|
|
13
|
+
import dataLayerFactory from './layer/dataLayerFactory';
|
|
14
|
+
import featureGroupFactory from './layer/featureGroupFactory';
|
|
15
|
+
import layerGroupFactory from './layer/layerGroupFactory';
|
|
16
|
+
import markerClusterGroupFactory from './layer/markerClusterGroupFactory';
|
|
17
|
+
import overpassLayerFactory from './layer/overpassLayerFactory';
|
|
18
|
+
import providerLayerFactory from './layer/providerLayerFactory';
|
|
19
|
+
import tileLayerFactory from './layer/tileLayerFactory';
|
|
23
20
|
|
|
24
21
|
layerTypes.register('data', dataLayerFactory);
|
|
25
22
|
layerTypes.register('featureGroup', featureGroupFactory);
|
package/js/client.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import MapElement from './element/MapElement';
|
|
2
|
-
import EditorElement from "./element/EditorElement";
|
|
3
|
-
|
|
4
|
-
import layerTypes from './layer';
|
|
5
1
|
import controlTypes from './control';
|
|
6
|
-
import
|
|
2
|
+
import EditorElement from './element/EditorElement';
|
|
3
|
+
import MapElement from './element/MapElement';
|
|
7
4
|
import {mapFactory} from './factory';
|
|
5
|
+
import iconTypes from './icon';
|
|
6
|
+
import layerTypes from './layer';
|
|
8
7
|
|
|
9
8
|
import 'leaflet/dist/leaflet.css';
|
|
10
9
|
import '@geoman-io/leaflet-geoman-free/dist/leaflet-geoman.css';
|
|
11
|
-
import 'leaflet-control-geocoder/Control.Geocoder.css';
|
|
10
|
+
import 'leaflet-control-geocoder/dist/Control.Geocoder.css';
|
|
12
11
|
import 'leaflet.fullscreen/Control.FullScreen.css';
|
|
13
12
|
import 'leaflet-loading/src/Control.Loading.css';
|
|
14
13
|
import 'leaflet.markercluster/dist/MarkerCluster.css';
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
Geocoder,
|
|
3
|
+
geocoders
|
|
4
|
+
} from 'leaflet-control-geocoder';
|
|
5
|
+
|
|
6
|
+
import {cowegis} from '../geocoder/Cowegis';
|
|
7
|
+
|
|
8
|
+
geocoders.cowegis = cowegis;
|
|
2
9
|
|
|
3
10
|
export default async function(config) {
|
|
4
|
-
if (config.
|
|
5
|
-
|
|
11
|
+
if (config.geocoder !== undefined && config.geocoder !== null && !config.options.geocode) {
|
|
12
|
+
config.options.geocoder = geocoders[config.geocoder.type](config.geocoder.options)
|
|
6
13
|
}
|
|
7
14
|
|
|
8
15
|
return new Geocoder(config.options);
|
package/js/control/index.js
CHANGED
package/js/element/MapElement.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import AssetsLoader from '../assets/AssetsLoader';
|
|
2
|
+
import { mapFactory } from '../factory';
|
|
1
3
|
import L from '../leaflet';
|
|
2
|
-
import AssetsLoader from "../assets/AssetsLoader";
|
|
3
|
-
import { mapFactory } from "../factory";
|
|
4
4
|
|
|
5
5
|
const template = `
|
|
6
6
|
<div class="cowegis-map-container" style="height: 100%"></div>
|
package/js/factory/MapFactory.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import {LatLngBounds} from 'leaflet';
|
|
2
|
+
|
|
1
3
|
import controlTypes from '../control';
|
|
2
|
-
import layerTypes from '../layer';
|
|
3
4
|
import iconTypes from '../icon';
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
import
|
|
5
|
+
import layerTypes from '../layer';
|
|
6
|
+
|
|
7
|
+
import bindEvents from './bindEvents';
|
|
8
|
+
import preloadAssets from './preloadAssets';
|
|
7
9
|
|
|
8
10
|
class MapFactory {
|
|
9
11
|
constructor() {
|
|
@@ -30,7 +32,7 @@ class MapFactory {
|
|
|
30
32
|
|
|
31
33
|
element.map = element.leaflet.map(element.container, config.options);
|
|
32
34
|
|
|
33
|
-
config.panes.forEach((pane) =>
|
|
35
|
+
config.panes.forEach((pane) => this.createPane(pane, element));
|
|
34
36
|
config.layers.forEach((layer) => promises.push(this.createLayer(layer, element)));
|
|
35
37
|
config.controls.forEach((config) => promises.push(this.createControl(config, element)));
|
|
36
38
|
|
|
@@ -124,20 +126,6 @@ class MapFactory {
|
|
|
124
126
|
registerListeners(config, element) {
|
|
125
127
|
bindEvents(element.map, config.events, element);
|
|
126
128
|
}
|
|
127
|
-
|
|
128
|
-
getListener(element, reference)
|
|
129
|
-
{
|
|
130
|
-
if (reference.namespace === null) {
|
|
131
|
-
return element.listeners[reference.reference];
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
let listeners = element.listeners;
|
|
135
|
-
reference.namespace.forEach(function (part) {
|
|
136
|
-
listeners = listeners[part];
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
return listeners[reference.reference];
|
|
140
|
-
}
|
|
141
129
|
}
|
|
142
130
|
|
|
143
131
|
export default MapFactory;
|
package/js/factory/index.js
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {Util} from 'leaflet';
|
|
2
|
+
import {geocoders} from 'leaflet-control-geocoder';
|
|
3
|
+
|
|
4
|
+
function getParamString(obj, existingUrl, uppercase) {
|
|
5
|
+
const params = [];
|
|
6
|
+
for (const i in obj) {
|
|
7
|
+
const key = encodeURIComponent(uppercase ? i.toUpperCase() : i);
|
|
8
|
+
const value = obj[i];
|
|
9
|
+
if (!Array.isArray(value)) {
|
|
10
|
+
params.push(key + '=' + encodeURIComponent(String(value)));
|
|
11
|
+
} else {
|
|
12
|
+
for (let j = 0; j < value.length; j++) {
|
|
13
|
+
params.push(key + '=' + encodeURIComponent(value[j]));
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return (!existingUrl || existingUrl.indexOf('?') === -1 ? '?' : '&') + params.join('&');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function getJSON(url, params, callback) {
|
|
21
|
+
const xmlHttp = new XMLHttpRequest();
|
|
22
|
+
xmlHttp.onreadystatechange = function () {
|
|
23
|
+
if (xmlHttp.readyState !== 4) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
let message;
|
|
27
|
+
if (xmlHttp.status !== 200 && xmlHttp.status !== 304) {
|
|
28
|
+
message = '';
|
|
29
|
+
} else if (typeof xmlHttp.response === 'string') {
|
|
30
|
+
// IE doesn't parse JSON responses even with responseType: 'json'.
|
|
31
|
+
try {
|
|
32
|
+
message = JSON.parse(xmlHttp.response);
|
|
33
|
+
} catch (e) {
|
|
34
|
+
// Not a JSON response
|
|
35
|
+
message = xmlHttp.response;
|
|
36
|
+
}
|
|
37
|
+
} else {
|
|
38
|
+
message = xmlHttp.response;
|
|
39
|
+
}
|
|
40
|
+
callback(message);
|
|
41
|
+
};
|
|
42
|
+
xmlHttp.open('GET', url + getParamString(params), true);
|
|
43
|
+
xmlHttp.responseType = 'json';
|
|
44
|
+
xmlHttp.setRequestHeader('Accept', 'application/json');
|
|
45
|
+
xmlHttp.send(null);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class Cowegis extends geocoders.Nominatim {
|
|
49
|
+
geocode(query, cb, context) {
|
|
50
|
+
const params = Util.extend({
|
|
51
|
+
q: query,
|
|
52
|
+
limit: 5,
|
|
53
|
+
format: 'json',
|
|
54
|
+
addressdetails: 1
|
|
55
|
+
}, this.options.geocodingQueryParams);
|
|
56
|
+
getJSON(this.options.serviceUrl, params, data => {
|
|
57
|
+
const results = [];
|
|
58
|
+
for (let i = data.length - 1; i >= 0; i--) {
|
|
59
|
+
const bbox = data[i].boundingbox;
|
|
60
|
+
for (let j = 0; j < 4; j++) bbox[j] = +bbox[j];
|
|
61
|
+
results[i] = {
|
|
62
|
+
icon: data[i].icon,
|
|
63
|
+
name: data[i].display_name,
|
|
64
|
+
html: this.options.htmlTemplate ? this.options.htmlTemplate(data[i]) : undefined,
|
|
65
|
+
bbox: L.latLngBounds([bbox[0], bbox[2]], [bbox[1], bbox[3]]),
|
|
66
|
+
center: L.latLng(data[i].lat, data[i].lon),
|
|
67
|
+
properties: data[i]
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
cb.call(context, results);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function cowegis(options) {
|
|
76
|
+
return new Cowegis(options);
|
|
77
|
+
}
|
package/js/geojson/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import bindEvents from
|
|
2
|
-
|
|
3
|
-
import
|
|
1
|
+
import bindEvents from '../factory/bindEvents';
|
|
2
|
+
|
|
3
|
+
import bindPopupFromFeature from './bindPopupFromFeature';
|
|
4
|
+
import bindTooltipFromFeature from './bindTooltipFromFeature';
|
|
4
5
|
|
|
5
6
|
export default function (feature, latlng, element) {
|
|
6
7
|
let type = 'marker';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { icon, findIconDefinition, library } from
|
|
2
|
-
|
|
1
|
+
import { icon, findIconDefinition, library } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
|
|
3
|
+
import SvgIcon from './SvgIcon';
|
|
3
4
|
|
|
4
5
|
const prefixes = {
|
|
5
6
|
solid: 'fas',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import {Util} from 'leaflet';
|
|
2
|
+
|
|
3
|
+
import FontAwesomeIcon from './FontAwesomeIcon';
|
|
3
4
|
|
|
4
5
|
const attribution = '<a href="https://fontawesome.com/" target="_blank" rel="nofollow noopener" title="Font Awesome Free Icons by Fonticons Inc.">Font Awesome</a>';
|
|
5
6
|
|
package/js/icon/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import osmtogeojson from 'osmtogeojson';
|
|
2
|
+
|
|
1
3
|
import leaflet from '../leaflet';
|
|
2
|
-
import osmtogeojson from "osmtogeojson";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Get the bounds as overpass bbox string.
|
|
@@ -10,7 +11,7 @@ function toOverpassBBoxString (LatLngBounds) {
|
|
|
10
11
|
var a = LatLngBounds._southWest,
|
|
11
12
|
b = LatLngBounds._northEast;
|
|
12
13
|
|
|
13
|
-
return [a.lat, a.lng, b.lat, b.lng].join(
|
|
14
|
+
return [a.lat, a.lng, b.lat, b.lng].join(',');
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -57,7 +58,7 @@ export default leaflet.FeatureGroup.extend({
|
|
|
57
58
|
|
|
58
59
|
var bounds = toOverpassBBoxString(this._map.getBounds());
|
|
59
60
|
var query = this.options.query.replace(/(BBOX)/g, bounds);
|
|
60
|
-
var url = this.options.endpoint +
|
|
61
|
+
var url = this.options.endpoint + 'interpreter?data=[out:json];' + query;
|
|
61
62
|
|
|
62
63
|
this._map.fire('dataloading', {layer: this});
|
|
63
64
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import pointToLayer from "../geojson/pointToLayer";
|
|
1
|
+
import {mapFactory} from '../factory';
|
|
3
2
|
import {determineListener} from '../factory/bindEvents';
|
|
4
|
-
import preloadAssets from
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import preloadAssets from '../factory/preloadAssets';
|
|
4
|
+
import {from} from '../geojson';
|
|
5
|
+
import pointToLayer from '../geojson/pointToLayer';
|
|
6
|
+
import leaflet from '../leaflet';
|
|
7
7
|
|
|
8
8
|
function boundsListener(layer, map) {
|
|
9
9
|
if (!layer.options.adjustBounds) {
|
|
@@ -57,7 +57,7 @@ export default async function (config, element) {
|
|
|
57
57
|
throw new Error(`Unknown data type "${config.data.type}"`);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
data =
|
|
60
|
+
data = from(config.data.format, data);
|
|
61
61
|
|
|
62
62
|
// TODO: Implement a better way for preprocessing geojson data
|
|
63
63
|
if (data.features) {
|
package/js/leaflet/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import leaflet from 'leaflet';
|
|
2
|
-
|
|
3
|
-
import
|
|
2
|
+
|
|
3
|
+
import '@raruto/leaflet-gesture-handling';
|
|
4
|
+
import { ATTRIBUTION} from '../config';
|
|
4
5
|
|
|
5
6
|
/* This code is needed to properly load the images in the Leaflet CSS */
|
|
6
7
|
delete leaflet.Icon.Default.prototype._getIconUrl;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cowegis/client",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-alpha5",
|
|
4
4
|
"description": "Cowegis web client",
|
|
5
5
|
"main": "js/client.js",
|
|
6
6
|
"repository": {
|
|
@@ -20,24 +20,35 @@
|
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://github.com/cowegis/cowegis-js-client#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@fortawesome/fontawesome-svg-core": "^1
|
|
24
|
-
"@fortawesome/free-brands-svg-icons": "^
|
|
25
|
-
"@fortawesome/free-regular-svg-icons": "^
|
|
26
|
-
"@fortawesome/free-solid-svg-icons": "^
|
|
27
|
-
"@geoman-io/leaflet-geoman-free": "^2.
|
|
28
|
-
"@mapbox/maki": "^6.2.0",
|
|
23
|
+
"@fortawesome/fontawesome-svg-core": "^6.1",
|
|
24
|
+
"@fortawesome/free-brands-svg-icons": "^6.1",
|
|
25
|
+
"@fortawesome/free-regular-svg-icons": "^6.1",
|
|
26
|
+
"@fortawesome/free-solid-svg-icons": "^6.1",
|
|
27
|
+
"@geoman-io/leaflet-geoman-free": "^2.13.0",
|
|
29
28
|
"@mapbox/togeojson": "^0.16.0",
|
|
30
|
-
"@raruto/leaflet-gesture-handling": "^1.3
|
|
31
|
-
"leaflet": "^1.
|
|
32
|
-
"leaflet-control-geocoder": "^
|
|
29
|
+
"@raruto/leaflet-gesture-handling": "^1.4.3",
|
|
30
|
+
"leaflet": "^1.8.0",
|
|
31
|
+
"leaflet-control-geocoder": "^2.4.0",
|
|
33
32
|
"leaflet-loading": "^0.1.24",
|
|
34
|
-
"leaflet-providers": "^1.
|
|
35
|
-
"leaflet.fullscreen": "^
|
|
36
|
-
"leaflet.markercluster": "^1.
|
|
33
|
+
"leaflet-providers": "^1.13.0",
|
|
34
|
+
"leaflet.fullscreen": "^2.4.0",
|
|
35
|
+
"leaflet.markercluster": "^1.5.3",
|
|
37
36
|
"leaflet.markercluster.layersupport": "^2.0.1",
|
|
38
37
|
"osmtogeojson": "^3.0.0-beta.4",
|
|
39
38
|
"spin.js": "^4.1.0",
|
|
40
39
|
"topojson-client": "^3.1.0",
|
|
41
40
|
"wellknown": "^0.5.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@babel/eslint-parser": "^7.18.2",
|
|
44
|
+
"eslint": "^8.15.0",
|
|
45
|
+
"eslint-import-resolver-typescript": "^2.7.1",
|
|
46
|
+
"eslint-import-resolver-webpack": "^0.13.2",
|
|
47
|
+
"eslint-plugin-html": "^6.2.0",
|
|
48
|
+
"eslint-plugin-import": "^2.26.0"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"lint": "eslint --ext .js js/",
|
|
52
|
+
"fix": "eslint --ext .js js/ --fix"
|
|
42
53
|
}
|
|
43
54
|
}
|