m-gis-ui
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -23,3 +23,3 @@ 'use strict'; | ||
patchBrowser().then(options => { | ||
return index.bootstrapLazy([["map-district_2.cjs",[[1,"map-district",{"visible":[4],"source":[16],"nameAlias":[1,"name-alias"],"codeAlias":[1,"code-alias"],"childrenAlias":[1,"children-alias"],"districtType":[32],"keyword":[32],"list":[32],"districtSelected":[32]}],[1,"map-toolbar",{"gis":[8],"mapInstance":[8,"map-instance"],"visible":[4],"offset":[8],"operations":[16],"placement":[1],"mode":[1],"color":[1],"actions":[16],"isClear":[4,"is-clear"],"markerIconOptions":[16],"overlayOptions":[16],"infoWindowContent":[16]}]]],["map-isochron.cjs",[[6,"map-isochron",{"name":[1]}]]],["map-legend.cjs",[[0,"map-legend",{"visible":[4],"dataMap":[16],"left":[2],"bottom":[2]}]]],["map-toolbar-edit-panel.cjs",[[1,"map-toolbar-edit-panel",{"visible":[4],"actionType":[1,"action-type"],"name":[32],"description":[32]}]]]], options); | ||
return index.bootstrapLazy([["map-district_2.cjs",[[1,"map-district",{"visible":[4],"source":[16],"nameAlias":[1,"name-alias"],"codeAlias":[1,"code-alias"],"childrenAlias":[1,"children-alias"],"districtType":[32],"keyword":[32],"list":[32],"districtSelected":[32]}],[1,"map-toolbar",{"gis":[8],"mapInstance":[8,"map-instance"],"visible":[4],"offset":[8],"operations":[16],"placement":[1],"mode":[1],"color":[1],"actions":[16],"isClear":[4,"is-clear"],"markerIconOptions":[16],"overlayOptions":[16],"infoWindowContent":[16]}]]],["map-isochron.cjs",[[6,"map-isochron",{"name":[1]}]]],["map-legend.cjs",[[0,"map-legend",{"visible":[4],"dataMap":[16],"left":[2],"bottom":[2],"width":[2],"height":[2]}]]],["map-toolbar-edit-panel.cjs",[[1,"map-toolbar-edit-panel",{"visible":[4],"actionType":[1,"action-type"],"name":[32],"description":[32]}]]]], options); | ||
}); | ||
@@ -26,0 +26,0 @@ |
@@ -17,3 +17,3 @@ 'use strict'; | ||
return patchEsm().then(() => { | ||
return index.bootstrapLazy([["map-district_2.cjs",[[1,"map-district",{"visible":[4],"source":[16],"nameAlias":[1,"name-alias"],"codeAlias":[1,"code-alias"],"childrenAlias":[1,"children-alias"],"districtType":[32],"keyword":[32],"list":[32],"districtSelected":[32]}],[1,"map-toolbar",{"gis":[8],"mapInstance":[8,"map-instance"],"visible":[4],"offset":[8],"operations":[16],"placement":[1],"mode":[1],"color":[1],"actions":[16],"isClear":[4,"is-clear"],"markerIconOptions":[16],"overlayOptions":[16],"infoWindowContent":[16]}]]],["map-isochron.cjs",[[6,"map-isochron",{"name":[1]}]]],["map-legend.cjs",[[0,"map-legend",{"visible":[4],"dataMap":[16],"left":[2],"bottom":[2]}]]],["map-toolbar-edit-panel.cjs",[[1,"map-toolbar-edit-panel",{"visible":[4],"actionType":[1,"action-type"],"name":[32],"description":[32]}]]]], options); | ||
return index.bootstrapLazy([["map-district_2.cjs",[[1,"map-district",{"visible":[4],"source":[16],"nameAlias":[1,"name-alias"],"codeAlias":[1,"code-alias"],"childrenAlias":[1,"children-alias"],"districtType":[32],"keyword":[32],"list":[32],"districtSelected":[32]}],[1,"map-toolbar",{"gis":[8],"mapInstance":[8,"map-instance"],"visible":[4],"offset":[8],"operations":[16],"placement":[1],"mode":[1],"color":[1],"actions":[16],"isClear":[4,"is-clear"],"markerIconOptions":[16],"overlayOptions":[16],"infoWindowContent":[16]}]]],["map-isochron.cjs",[[6,"map-isochron",{"name":[1]}]]],["map-legend.cjs",[[0,"map-legend",{"visible":[4],"dataMap":[16],"left":[2],"bottom":[2],"width":[2],"height":[2]}]]],["map-toolbar-edit-panel.cjs",[[1,"map-toolbar-edit-panel",{"visible":[4],"actionType":[1,"action-type"],"name":[32],"description":[32]}]]]], options); | ||
}); | ||
@@ -20,0 +20,0 @@ }; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
const mapLegendCss = ":host{display:block}.legend-box{position:absolute;bottom:40px;left:40px;font-size:12px;color:#333;padding:10px;background:#fff;border-radius:4px}.legend-box>div{line-height:2}.legend-box .legend-icon{display:inline-block;width:30px;height:8px;margin-right:8px}.legend-box .icon-img{width:14px;height:14px;margin-right:10px}"; | ||
const mapLegendCss = ":host{display:block}.legend-box{position:absolute;bottom:40px;left:40px;font-size:12px;color:#333;padding:10px;background:#fff;border-radius:4px}.legend-box>div{display:flex;align-items:center;justify-content:space-between;line-height:2}.legend-box .icon-box{display:inline-flex}.legend-box .legend-icon{display:inline-block;width:14px;height:14px;margin-right:8px}.legend-box .icon-img{width:14px;height:14px;margin-right:8px}"; | ||
@@ -17,6 +17,8 @@ const MapLegend = class { | ||
this.bottom = 40; | ||
this.width = 14; | ||
this.height = 14; | ||
} | ||
showIcon(iconUrl) { | ||
if (iconUrl) { | ||
return index.h("img", { class: "icon-img", src: iconUrl, alt: "" }); | ||
return index.h("img", { class: "icon-img", style: { width: this.width + 'px', height: this.height + 'px' }, src: iconUrl, alt: "" }); | ||
} | ||
@@ -26,3 +28,3 @@ } | ||
if (color) { | ||
return index.h("span", { class: "legend-icon", style: { 'background-color': color } }); | ||
return index.h("span", { class: "legend-icon", style: { 'background-color': color, width: this.width + 'px', height: this.height + 'px' } }); | ||
} | ||
@@ -36,3 +38,3 @@ } | ||
if (this.visible) { | ||
return (index.h(index.Host, { class: "legend-box", style: { 'left': this.left + 'px', 'bottom': this.bottom + 'px' } }, this.dataMap.map((item) => (index.h("div", null, this.showIcon(item.icon), this.showColor(item.color), index.h("span", null, item.label)))))); | ||
return (index.h(index.Host, { class: "legend-box", style: { 'left': this.left + 'px', 'bottom': this.bottom + 'px' } }, this.dataMap.map((item) => (index.h("div", null, index.h("span", { class: "icon-box" }, this.showIcon(item.icon), this.showColor(item.color)), index.h("span", null, item.label)))))); | ||
} | ||
@@ -39,0 +41,0 @@ } |
@@ -8,6 +8,8 @@ import { Host, h } from '@stencil/core'; | ||
this.bottom = 40; | ||
this.width = 14; | ||
this.height = 14; | ||
} | ||
showIcon(iconUrl) { | ||
if (iconUrl) { | ||
return h("img", { class: "icon-img", src: iconUrl, alt: "" }); | ||
return h("img", { class: "icon-img", style: { width: this.width + 'px', height: this.height + 'px' }, src: iconUrl, alt: "" }); | ||
} | ||
@@ -17,3 +19,3 @@ } | ||
if (color) { | ||
return h("span", { class: "legend-icon", style: { 'background-color': color } }); | ||
return h("span", { class: "legend-icon", style: { 'background-color': color, width: this.width + 'px', height: this.height + 'px' } }); | ||
} | ||
@@ -27,3 +29,3 @@ } | ||
if (this.visible) { | ||
return (h(Host, { class: "legend-box", style: { 'left': this.left + 'px', 'bottom': this.bottom + 'px' } }, this.dataMap.map((item) => (h("div", null, this.showIcon(item.icon), this.showColor(item.color), h("span", null, item.label)))))); | ||
return (h(Host, { class: "legend-box", style: { 'left': this.left + 'px', 'bottom': this.bottom + 'px' } }, this.dataMap.map((item) => (h("div", null, h("span", { class: "icon-box" }, this.showIcon(item.icon), this.showColor(item.color)), h("span", null, item.label)))))); | ||
} | ||
@@ -114,2 +116,38 @@ } | ||
"defaultValue": "40" | ||
}, | ||
"width": { | ||
"type": "number", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "number", | ||
"resolved": "number", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "width", | ||
"reflect": false, | ||
"defaultValue": "14" | ||
}, | ||
"height": { | ||
"type": "number", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "number", | ||
"resolved": "number", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "height", | ||
"reflect": false, | ||
"defaultValue": "14" | ||
} | ||
@@ -116,0 +154,0 @@ }; |
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client'; | ||
const mapLegendCss = ":host{display:block}.legend-box{position:absolute;bottom:40px;left:40px;font-size:12px;color:#333;padding:10px;background:#fff;border-radius:4px}.legend-box>div{line-height:2}.legend-box .legend-icon{display:inline-block;width:30px;height:8px;margin-right:8px}.legend-box .icon-img{width:14px;height:14px;margin-right:10px}"; | ||
const mapLegendCss = ":host{display:block}.legend-box{position:absolute;bottom:40px;left:40px;font-size:12px;color:#333;padding:10px;background:#fff;border-radius:4px}.legend-box>div{display:flex;align-items:center;justify-content:space-between;line-height:2}.legend-box .icon-box{display:inline-flex}.legend-box .legend-icon{display:inline-block;width:14px;height:14px;margin-right:8px}.legend-box .icon-img{width:14px;height:14px;margin-right:8px}"; | ||
@@ -13,6 +13,8 @@ const MapLegend$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement { | ||
this.bottom = 40; | ||
this.width = 14; | ||
this.height = 14; | ||
} | ||
showIcon(iconUrl) { | ||
if (iconUrl) { | ||
return h("img", { class: "icon-img", src: iconUrl, alt: "" }); | ||
return h("img", { class: "icon-img", style: { width: this.width + 'px', height: this.height + 'px' }, src: iconUrl, alt: "" }); | ||
} | ||
@@ -22,3 +24,3 @@ } | ||
if (color) { | ||
return h("span", { class: "legend-icon", style: { 'background-color': color } }); | ||
return h("span", { class: "legend-icon", style: { 'background-color': color, width: this.width + 'px', height: this.height + 'px' } }); | ||
} | ||
@@ -32,3 +34,3 @@ } | ||
if (this.visible) { | ||
return (h(Host, { class: "legend-box", style: { 'left': this.left + 'px', 'bottom': this.bottom + 'px' } }, this.dataMap.map((item) => (h("div", null, this.showIcon(item.icon), this.showColor(item.color), h("span", null, item.label)))))); | ||
return (h(Host, { class: "legend-box", style: { 'left': this.left + 'px', 'bottom': this.bottom + 'px' } }, this.dataMap.map((item) => (h("div", null, h("span", { class: "icon-box" }, this.showIcon(item.icon), this.showColor(item.color)), h("span", null, item.label)))))); | ||
} | ||
@@ -42,3 +44,5 @@ } | ||
"left": [2], | ||
"bottom": [2] | ||
"bottom": [2], | ||
"width": [2], | ||
"height": [2] | ||
}]); | ||
@@ -45,0 +49,0 @@ function defineCustomElement$1() { |
@@ -20,5 +20,5 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-e304c267.js'; | ||
patchBrowser().then(options => { | ||
return bootstrapLazy([["map-district_2",[[1,"map-district",{"visible":[4],"source":[16],"nameAlias":[1,"name-alias"],"codeAlias":[1,"code-alias"],"childrenAlias":[1,"children-alias"],"districtType":[32],"keyword":[32],"list":[32],"districtSelected":[32]}],[1,"map-toolbar",{"gis":[8],"mapInstance":[8,"map-instance"],"visible":[4],"offset":[8],"operations":[16],"placement":[1],"mode":[1],"color":[1],"actions":[16],"isClear":[4,"is-clear"],"markerIconOptions":[16],"overlayOptions":[16],"infoWindowContent":[16]}]]],["map-isochron",[[6,"map-isochron",{"name":[1]}]]],["map-legend",[[0,"map-legend",{"visible":[4],"dataMap":[16],"left":[2],"bottom":[2]}]]],["map-toolbar-edit-panel",[[1,"map-toolbar-edit-panel",{"visible":[4],"actionType":[1,"action-type"],"name":[32],"description":[32]}]]]], options); | ||
return bootstrapLazy([["map-district_2",[[1,"map-district",{"visible":[4],"source":[16],"nameAlias":[1,"name-alias"],"codeAlias":[1,"code-alias"],"childrenAlias":[1,"children-alias"],"districtType":[32],"keyword":[32],"list":[32],"districtSelected":[32]}],[1,"map-toolbar",{"gis":[8],"mapInstance":[8,"map-instance"],"visible":[4],"offset":[8],"operations":[16],"placement":[1],"mode":[1],"color":[1],"actions":[16],"isClear":[4,"is-clear"],"markerIconOptions":[16],"overlayOptions":[16],"infoWindowContent":[16]}]]],["map-isochron",[[6,"map-isochron",{"name":[1]}]]],["map-legend",[[0,"map-legend",{"visible":[4],"dataMap":[16],"left":[2],"bottom":[2],"width":[2],"height":[2]}]]],["map-toolbar-edit-panel",[[1,"map-toolbar-edit-panel",{"visible":[4],"actionType":[1,"action-type"],"name":[32],"description":[32]}]]]], options); | ||
}); | ||
//# sourceMappingURL=gis-ui.js.map |
@@ -14,3 +14,3 @@ import { p as promiseResolve, b as bootstrapLazy } from './index-e304c267.js'; | ||
return patchEsm().then(() => { | ||
return bootstrapLazy([["map-district_2",[[1,"map-district",{"visible":[4],"source":[16],"nameAlias":[1,"name-alias"],"codeAlias":[1,"code-alias"],"childrenAlias":[1,"children-alias"],"districtType":[32],"keyword":[32],"list":[32],"districtSelected":[32]}],[1,"map-toolbar",{"gis":[8],"mapInstance":[8,"map-instance"],"visible":[4],"offset":[8],"operations":[16],"placement":[1],"mode":[1],"color":[1],"actions":[16],"isClear":[4,"is-clear"],"markerIconOptions":[16],"overlayOptions":[16],"infoWindowContent":[16]}]]],["map-isochron",[[6,"map-isochron",{"name":[1]}]]],["map-legend",[[0,"map-legend",{"visible":[4],"dataMap":[16],"left":[2],"bottom":[2]}]]],["map-toolbar-edit-panel",[[1,"map-toolbar-edit-panel",{"visible":[4],"actionType":[1,"action-type"],"name":[32],"description":[32]}]]]], options); | ||
return bootstrapLazy([["map-district_2",[[1,"map-district",{"visible":[4],"source":[16],"nameAlias":[1,"name-alias"],"codeAlias":[1,"code-alias"],"childrenAlias":[1,"children-alias"],"districtType":[32],"keyword":[32],"list":[32],"districtSelected":[32]}],[1,"map-toolbar",{"gis":[8],"mapInstance":[8,"map-instance"],"visible":[4],"offset":[8],"operations":[16],"placement":[1],"mode":[1],"color":[1],"actions":[16],"isClear":[4,"is-clear"],"markerIconOptions":[16],"overlayOptions":[16],"infoWindowContent":[16]}]]],["map-isochron",[[6,"map-isochron",{"name":[1]}]]],["map-legend",[[0,"map-legend",{"visible":[4],"dataMap":[16],"left":[2],"bottom":[2],"width":[2],"height":[2]}]]],["map-toolbar-edit-panel",[[1,"map-toolbar-edit-panel",{"visible":[4],"actionType":[1,"action-type"],"name":[32],"description":[32]}]]]], options); | ||
}); | ||
@@ -17,0 +17,0 @@ }; |
import { r as registerInstance, h, H as Host } from './index-e304c267.js'; | ||
const mapLegendCss = ":host{display:block}.legend-box{position:absolute;bottom:40px;left:40px;font-size:12px;color:#333;padding:10px;background:#fff;border-radius:4px}.legend-box>div{line-height:2}.legend-box .legend-icon{display:inline-block;width:30px;height:8px;margin-right:8px}.legend-box .icon-img{width:14px;height:14px;margin-right:10px}"; | ||
const mapLegendCss = ":host{display:block}.legend-box{position:absolute;bottom:40px;left:40px;font-size:12px;color:#333;padding:10px;background:#fff;border-radius:4px}.legend-box>div{display:flex;align-items:center;justify-content:space-between;line-height:2}.legend-box .icon-box{display:inline-flex}.legend-box .legend-icon{display:inline-block;width:14px;height:14px;margin-right:8px}.legend-box .icon-img{width:14px;height:14px;margin-right:8px}"; | ||
@@ -12,6 +12,8 @@ const MapLegend = class { | ||
this.bottom = 40; | ||
this.width = 14; | ||
this.height = 14; | ||
} | ||
showIcon(iconUrl) { | ||
if (iconUrl) { | ||
return h("img", { class: "icon-img", src: iconUrl, alt: "" }); | ||
return h("img", { class: "icon-img", style: { width: this.width + 'px', height: this.height + 'px' }, src: iconUrl, alt: "" }); | ||
} | ||
@@ -21,3 +23,3 @@ } | ||
if (color) { | ||
return h("span", { class: "legend-icon", style: { 'background-color': color } }); | ||
return h("span", { class: "legend-icon", style: { 'background-color': color, width: this.width + 'px', height: this.height + 'px' } }); | ||
} | ||
@@ -31,3 +33,3 @@ } | ||
if (this.visible) { | ||
return (h(Host, { class: "legend-box", style: { 'left': this.left + 'px', 'bottom': this.bottom + 'px' } }, this.dataMap.map((item) => (h("div", null, this.showIcon(item.icon), this.showColor(item.color), h("span", null, item.label)))))); | ||
return (h(Host, { class: "legend-box", style: { 'left': this.left + 'px', 'bottom': this.bottom + 'px' } }, this.dataMap.map((item) => (h("div", null, h("span", { class: "icon-box" }, this.showIcon(item.icon), this.showColor(item.color)), h("span", null, item.label)))))); | ||
} | ||
@@ -34,0 +36,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import{p as e,b as a}from"./p-b292496b.js";export{s as setNonce}from"./p-b292496b.js";const i=()=>{const a=import.meta.url;const i={};if(a!==""){i.resourcesUrl=new URL(".",a).href}return e(i)};i().then((e=>a([["p-1240b54a",[[1,"map-district",{visible:[4],source:[16],nameAlias:[1,"name-alias"],codeAlias:[1,"code-alias"],childrenAlias:[1,"children-alias"],districtType:[32],keyword:[32],list:[32],districtSelected:[32]}],[1,"map-toolbar",{gis:[8],mapInstance:[8,"map-instance"],visible:[4],offset:[8],operations:[16],placement:[1],mode:[1],color:[1],actions:[16],isClear:[4,"is-clear"],markerIconOptions:[16],overlayOptions:[16],infoWindowContent:[16]}]]],["p-b9178d34",[[6,"map-isochron",{name:[1]}]]],["p-4697ead6",[[0,"map-legend",{visible:[4],dataMap:[16],left:[2],bottom:[2]}]]],["p-7f864b99",[[1,"map-toolbar-edit-panel",{visible:[4],actionType:[1,"action-type"],name:[32],description:[32]}]]]],e))); | ||
import{p as e,b as i}from"./p-b292496b.js";export{s as setNonce}from"./p-b292496b.js";const a=()=>{const i=import.meta.url;const a={};if(i!==""){a.resourcesUrl=new URL(".",i).href}return e(a)};a().then((e=>i([["p-1240b54a",[[1,"map-district",{visible:[4],source:[16],nameAlias:[1,"name-alias"],codeAlias:[1,"code-alias"],childrenAlias:[1,"children-alias"],districtType:[32],keyword:[32],list:[32],districtSelected:[32]}],[1,"map-toolbar",{gis:[8],mapInstance:[8,"map-instance"],visible:[4],offset:[8],operations:[16],placement:[1],mode:[1],color:[1],actions:[16],isClear:[4,"is-clear"],markerIconOptions:[16],overlayOptions:[16],infoWindowContent:[16]}]]],["p-b9178d34",[[6,"map-isochron",{name:[1]}]]],["p-b26e4b69",[[0,"map-legend",{visible:[4],dataMap:[16],left:[2],bottom:[2],width:[2],height:[2]}]]],["p-7f864b99",[[1,"map-toolbar-edit-panel",{visible:[4],actionType:[1,"action-type"],name:[32],description:[32]}]]]],e))); | ||
//# sourceMappingURL=gis-ui.esm.js.map |
@@ -40,4 +40,6 @@ /* eslint-disable */ | ||
"dataMap": any[]; | ||
"height": number; | ||
"left": number; | ||
"visible": boolean; | ||
"width": number; | ||
} | ||
@@ -212,4 +214,6 @@ interface MapToolbar { | ||
"dataMap"?: any[]; | ||
"height"?: number; | ||
"left"?: number; | ||
"visible"?: boolean; | ||
"width"?: number; | ||
} | ||
@@ -216,0 +220,0 @@ interface MapToolbar { |
@@ -6,2 +6,4 @@ export declare class MapLegend { | ||
bottom: number; | ||
width: number; | ||
height: number; | ||
private showIcon; | ||
@@ -8,0 +10,0 @@ private showColor; |
{ | ||
"name": "m-gis-ui", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "A component library based on Gaode Map API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -156,1 +156,3 @@ #### 地图组件库的使用 | ||
left | 距左边的距离 | number | false | 40 | ||
height | 图例的高度 | number | false | 14 | ||
width | 图例的宽度 | number | false | 14 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1458930
10179
158