waibu-maps 2.1.5 → 2.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.
- package/extend/waibuBootstrap/theme/component/widget/control-search.js +3 -3
- 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
|
@@ -59,9 +59,9 @@ async function controlSearch () {
|
|
|
59
59
|
`, `
|
|
60
60
|
async ${prefix}Populate () {
|
|
61
61
|
const feeds = await ${this.params.attr.feed}() ?? []
|
|
62
|
-
feeds.unshift({ code: 'latLng', name: 'gotoLatLng', feed: { id: 'latLng',
|
|
62
|
+
feeds.unshift({ code: 'latLng', name: 'gotoLatLng', feed: { id: 'latLng', cmpLabel: 'latLng' } })
|
|
63
63
|
this.$store.mapSearch.feeds = feeds
|
|
64
|
-
const body = feeds.map(feed => '<c:dropdown-item :class="$store.mapSearch.feed === $el.getAttribute(\\'data-code-feedid\\') ? \\'active\\' : \\'\\'" data-code-feedid="' + feed.code + ':' + feed.feed.id + '" t:content="' +
|
|
64
|
+
const body = feeds.map(feed => '<c:dropdown-item :class="$store.mapSearch.feed === $el.getAttribute(\\'data-code-feedid\\') ? \\'active\\' : \\'\\'" data-code-feedid="' + feed.code + ':' + feed.feed.id + '" t:content="' + feed.feed.cmpLabel + '" @click="$store.mapSearch.feed = \\'' + feed.code + ':' + feed.feed.id + '\\'"/>')
|
|
65
65
|
await wmpa.addComponent(body, '#${id} .input-group .dropdown-menu', 'div', true, { theme: '${this.component.theme.name}', iconset: '${this.component.iconset.name}' })
|
|
66
66
|
if (!this.$store.mapSearch.feed) this.$store.mapSearch.feed = feeds[0].code + ':' + feeds[0].feed.id
|
|
67
67
|
const html = this.$store.mapSearch.recent ?? ''
|
|
@@ -78,7 +78,7 @@ async function controlSearch () {
|
|
|
78
78
|
get feedName () {
|
|
79
79
|
const [code, feedId] = (this.$store.mapSearch.feed ?? '').split(':')
|
|
80
80
|
const item = _.find(this.$store.mapSearch.feeds, f => f.code === code && f.feed.id === feedId)
|
|
81
|
-
return
|
|
81
|
+
return item ? item.feed.cmpLabel : code
|
|
82
82
|
},
|
|
83
83
|
search () {
|
|
84
84
|
this.$store.mapSearch.value = this.$refs.input.value
|
|
@@ -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