waibu-maps 2.1.6 → 2.2.1
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/extend/bajoTemplate/template/wmaps.js +2 -2
- package/extend/waibuBootstrap/theme/component/widget/layer-geojson.js +4 -4
- package/extend/waibuBootstrap/theme/component/widget/layer-html-cluster.js +2 -2
- package/extend/waibuBootstrap/theme/component/widget/map/options.js +1 -1
- package/package.json +1 -1
- package/wiki/CHANGES.md +8 -0
|
@@ -141,9 +141,9 @@ class WaibuMaps { // eslint-disable-line no-unused-vars
|
|
|
141
141
|
this.map.addImage(src.name, image.data)
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
loadIcon = async (icon) => {
|
|
144
|
+
loadIcon = async (icon, prefix) => {
|
|
145
145
|
if (this.map.listImages().includes(icon)) return
|
|
146
|
-
const href = this.iconPrefix + icon.split(':')[1]
|
|
146
|
+
const href = (prefix ?? this.iconPrefix) + icon.split(':')[1]
|
|
147
147
|
const image = await this.map.loadImage(href)
|
|
148
148
|
if (!this.map.listImages().includes(icon)) this.map.addImage(icon, image.data)
|
|
149
149
|
}
|
|
@@ -2,8 +2,8 @@ import wmapsBase from '../wmaps-base.js'
|
|
|
2
2
|
|
|
3
3
|
export function buildLayers (params) {
|
|
4
4
|
const { isString, map } = this.app.lib._
|
|
5
|
-
const { routePath } = this.app.waibu
|
|
6
|
-
const {
|
|
5
|
+
const { routePath, attrToArray } = this.app.waibu
|
|
6
|
+
const { jsonStringify } = this.app.waibuMpa
|
|
7
7
|
|
|
8
8
|
if (!isString(params.attr.layer)) return ''
|
|
9
9
|
const items = map(attrToArray(params.attr.layer), item => routePath(item))
|
|
@@ -18,8 +18,8 @@ export function buildLayers (params) {
|
|
|
18
18
|
|
|
19
19
|
export function buildImage (params) {
|
|
20
20
|
const { isString, map } = this.app.lib._
|
|
21
|
-
const { routePath } = this.app.waibu
|
|
22
|
-
const {
|
|
21
|
+
const { routePath, attrToArray } = this.app.waibu
|
|
22
|
+
const { jsonStringify } = this.app.waibuMpa
|
|
23
23
|
|
|
24
24
|
if (!isString(params.attr.image)) return ''
|
|
25
25
|
const items = map(attrToArray(params.attr.image), item => routePath(item))
|
|
@@ -65,8 +65,8 @@ async function layerHtmlCluster () {
|
|
|
65
65
|
|
|
66
66
|
build = async () => {
|
|
67
67
|
const { generateId } = this.app.lib.aneka
|
|
68
|
-
const {
|
|
69
|
-
const { fetch, routePath } = this.app.waibu
|
|
68
|
+
const { jsonStringify } = this.app.waibuMpa
|
|
69
|
+
const { fetch, routePath, attrToArray } = this.app.waibu
|
|
70
70
|
const { isString } = this.app.lib._
|
|
71
71
|
if (!this.params.attr.src) return
|
|
72
72
|
this.params.attr.name = this.params.attr.name ?? generateId('alpha')
|
|
@@ -11,7 +11,7 @@ export const opts = {
|
|
|
11
11
|
|
|
12
12
|
async function options (params = {}) {
|
|
13
13
|
const { camelCase, isString } = this.app.lib._
|
|
14
|
-
const { attrToArray } = this.app.
|
|
14
|
+
const { attrToArray } = this.app.waibu
|
|
15
15
|
const { routePath } = this.app.waibu
|
|
16
16
|
const mapOpts = this.app.waibuMaps.getConfig().mapOptions
|
|
17
17
|
mapOpts.container = params.attr.id
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED