<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                默認參數 如圖: ![](https://img.kancloud.cn/dc/aa/dcaabfad41bd2a0f195c38b61d25b5e4_860x533.png) ``` // 圖片 component.config.mapImgShow = false; component.config.image = 'images/class_icon.png'; component.config.mapImgSize = 10; component.config.mapImgOffsetY = 0; component.config.mapImgOffsetX = 0; ``` 配置項如下: 搜索case"chart": 替換整個 ![](https://img.kancloud.cn/da/9c/da9c05f685baefecc3d991f62e7fb8ee_831x574.png) ``` case "chart": layerConfig.elements.push( { title: '文本字段', type: "select-s-column", bind: "mapFontColumn", }, { title: '聯動維度', type: "select-s-column", bind: "linkageDimension", }, { title: '顏色', type: "colorpicker", bind: "mapFontColor", }, { title: '字體大小', type: "configSlide", bind: "mapFontSize", config: { slideEnd: 48 } }, { title: '文本偏移-X軸', type: "configSlide", bind: "mapFontOffsetX", config: { slideEnd: 48 } }, { title: '文本偏移-Y軸', type: "configSlide", bind: "mapFontOffsetY", config: { slideEnd: 48 } }, { title: '圖標', type: "switch", bind: "mapImgShow", on: vsLang.on, off: vsLang.off }, { title: vsLang.image, type: "imagepicker", bind: { name: "gemap", data: "image" }, show: function() { return component.config.mapImgShow != null && component.config.mapImgShow === true }, }, { title: '圖標大小', type: "configSlide", bind: "mapImgSize", config: { slideEnd: 20 }, show: function() { return component.config.mapImgShow != null && component.config.mapImgShow === true }, }, { title: '圖標-Y軸', type: "configSlide", bind: "mapImgOffsetY", config: { slideEnd: 100 }, show: function() { return component.config.mapImgShow != null && component.config.mapImgShow === true }, }, { title: '圖標-X軸', type: "configSlide", bind: "mapImgOffsetX", config: { slideEnd: 100 }, show: function() { return component.config.mapImgShow != null && component.config.mapImgShow === true }, }, { title: '提示框', type: "switch", bind: "tooltipShow", on: vsLang.on, off: vsLang.off }, { title: vsLang.show_columns, type: "multiQueryColumnSelect", bind: "showColumns", show: function() { return component.config.tooltipShow != null && component.config.tooltipShow === true }, }, { title: vsLang.bg_color, type: "colorpicker", bind: "bgColor_tooltip", show: function() { return component.config.tooltipShow != null && component.config.tooltipShow === true }, }, { title: vsLang.font_color, type: "colorpicker", bind: "fontColor_tooltip", show: function() { return component.config.tooltipShow != null && component.config.tooltipShow === true }, }, ); if (component.config.mapFontColor == null) component.config.mapFontColor = "rgba(0, 0, 0, 1)"; if (component.config.mapFontSize == null) component.config.mapFontSize = 12; if (component.config.mapFontOffsetX == null) component.config.mapFontOffsetX = 0; if (component.config.mapFontOffsetY == null) component.config.mapFontOffsetY = 0; if (component.config.mapImgShow == null) component.config.mapImgShow = false; if (component.config.mapImgSize == null) component.config.mapImgSize = 10; if (component.config.mapImgOffsetY == null) component.config.mapImgOffsetY = 0; if (component.config.mapImgShow == null) component.config.mapImgShow = 0; break; ``` 邏輯代碼 搜索case"chart": 替換整個 ![](https://img.kancloud.cn/0b/64/0b64026a5f24e5910d4e40d543061035_859x597.png) ``` case "chart": // console.log(component.config.mapImgShow) // console.log(124354546) // console.log(component.config.image) var aa = component.config.image.replace(/{{appId}}/,localStorage.getItem('appId')); // console.log(aa) // console.log(localStorage.getItem('appId')) // 圖片開啟 if (map.getLayer(layerId) !== undefined) { map.removeLayer(layerId); } if (map.getSource(sourceId) !== undefined){ map.removeSource(sourceId); } if(component.config.mapImgShow){ var offset = []; if (component.config.mapImgOffsetX != null) { offset.push(parseInt(component.config.mapImgOffsetX)); } else { offset.push(0); } if (component.config.mapImgOffsetY != null) { offset.push(parseInt(component.config.mapImgOffsetY)); } else { offset.push(0); } var imgSize = parseFloat(component.config.mapImgSize/10) // console.log(offset) if(!map.hasImage('imgId')){ map.loadImage('/'+aa,function(error,data){ // console.log(data) map.addImage('imgId', data,{}) }) } if (map.getLayer(layerId) == undefined) { map.addSource(sourceId, { 'type': 'geojson', 'data': geojson }); map.addLayer({ 'id': layerId, 'source': sourceId, 'type': 'symbol', 'layout': { "icon-image":"imgId", "icon-size":imgSize, "icon-offset":offset } }); map.on('click',layerId,function(ev){ // console.log(ev.features) scope.onOverlayItemClicked(ev.features,ev) }) } else { map.getSource(sourceId).setData(geojson); } }else{ var offset = []; if (layer.mapFontOffsetX != null) { offset.push(parseInt(layer.mapFontOffsetX)); } else { offset.push(0); } if (layer.mapFontOffsetY != null) { offset.push(parseInt(layer.mapFontOffsetY)); } else { offset.push(0); } if (map.getLayer(layerId) == undefined) { map.addSource(sourceId, { 'type': 'geojson', 'data': geojson }); map.addLayer({ 'id': layerId, 'source': sourceId, 'type': 'symbol', 'layout': { "text-field": "{name}", "text-size": parseInt(layer.mapFontSize), "text-font": ["SimSun Regular"], "text-offset": offset, }, 'paint': { "text-color": layer.mapFontColor } }); map.on('click',layerId,function(ev){ // console.log(ev.features) scope.onOverlayItemClicked(ev.features,ev) }) } else { map.getSource(sourceId).setData(geojson); map.setPaintProperty(layerId, 'text-color', layer.mapFontColor); map.setLayoutProperty(layerId, 'text-size', parseInt(layer.mapFontSize)); map.setLayoutProperty(layerId, 'text-offset', offset); } } break; ``` 聯動事件 如圖位置代碼 添加作用域 并寫以下代碼 ![](https://img.kancloud.cn/b6/fa/b6faa78e0d5a9bf22c58517f74f91c99_1072x834.png) ``` // 聯動得點擊事件 scope.onOverlayItemClicked = function(ev,s) { // console.log(ev) var name = ev[0].properties.name.toString(); if (component.config.linkageDimension == null) { alert("未配置聯動維度"); return } // console.log(data) function findWithAttr(array, attr, value) { for(var i = 0; i < array.length; i += 1) { // console.log(array[i][attr]) if(array[i][attr] == value) { return i; }s } } // console.log(component.config.linkageDimension.name) var dm = findWithAttr(data,component.config.mapFontColumn.name,name); console.log(data[dm]) var t = data[dm][component.config.linkageDimension.name]; console.log(t) console.log(scope.component.config.linkageDimension.name) scope.cacheDimensionValue(scope.component.config.linkageDimension.name, t); scope.notifyDimensionValueChange(null, scope.component.config.linkageDimension, t) if(component.config.tooltipShow){ console.log(component.config.showColumns) var gistooltip = "tooltip"+component.id; var x = parseInt(s.point.x)-100; var y = parseInt(s.point.y)+30; // console.log($("#"+gistooltip)) $("."+gistooltip).css({ "overflow":"hidden", "height":"auto", "position":"absolute", "padding":"10px", "z-index": "99999", "display":"block", "top":y+"px", "color":component.config.fontColor_tooltip, "background":component.config.bgColor_tooltip, "left":x+"px", "font-size":"14px", "border-radius":"5px" }); var html = '' for(var i = 0;i<component.config.showColumns.length;i++){ html+='<p style="line-height:20px;">'+component.config.showColumns[i].name+':'+data[dm][component.config.showColumns[i].name]+'</p>' } console.log(html) $("."+gistooltip).empty().html(html) } }; ``` 分享頁 : 搜索 case"chart": 如圖位置 替換整個 ``` case "chart": // console.log(component.config.mapImgShow) // console.log(124354546) // console.log(component.config.image) var aa = component.config.image.replace(/{{appId}}/,localStorage.getItem('appId')); // console.log(aa) // console.log(localStorage.getItem('appId')) // 圖片開啟 if (map.getLayer(layerId) !== undefined) { map.removeLayer(layerId); } if (map.getSource(sourceId) !== undefined){ map.removeSource(sourceId); } if(component.config.mapImgShow){ var offset = []; if (component.config.mapImgOffsetX != null) { offset.push(parseInt(component.config.mapImgOffsetX)); } else { offset.push(0); } if (component.config.mapImgOffsetY != null) { offset.push(parseInt(component.config.mapImgOffsetY)); } else { offset.push(0); } var imgSize = parseFloat(component.config.mapImgSize/10) // console.log(offset) if(!map.hasImage('imgId')){ map.loadImage('/'+aa,function(error,data){ // console.log(data) map.addImage('imgId', data,{}) }) } if (map.getLayer(layerId) == undefined) { map.addSource(sourceId, { 'type': 'geojson', 'data': geojson }); map.addLayer({ 'id': layerId, 'source': sourceId, 'type': 'symbol', 'layout': { "icon-image":"imgId", "icon-size":imgSize, "icon-offset":offset } }); map.on('click',layerId,function(ev){ // console.log(ev.features) scope.onOverlayItemClicked(ev.features,ev) }) } else { map.getSource(sourceId).setData(geojson); } }else{ var offset = []; if (layer.mapFontOffsetX != null) { offset.push(parseInt(layer.mapFontOffsetX)); } else { offset.push(0); } if (layer.mapFontOffsetY != null) { offset.push(parseInt(layer.mapFontOffsetY)); } else { offset.push(0); } if (map.getLayer(layerId) == undefined) { map.addSource(sourceId, { 'type': 'geojson', 'data': geojson }); map.addLayer({ 'id': layerId, 'source': sourceId, 'type': 'symbol', 'layout': { "text-field": "{name}", "text-size": parseInt(layer.mapFontSize), "text-font": ["SimSun Regular"], "text-offset": offset, }, 'paint': { "text-color": layer.mapFontColor } }); map.on('click',layerId,function(ev){ // console.log(ev.features) scope.onOverlayItemClicked(ev.features,ev) }) } else { map.getSource(sourceId).setData(geojson); map.setPaintProperty(layerId, 'text-color', layer.mapFontColor); map.setLayoutProperty(layerId, 'text-size', parseInt(layer.mapFontSize)); map.setLayoutProperty(layerId, 'text-offset', offset); } } break; ``` 搜索loadLayer 這個方法 添加作用域 并 添加以下聯動事件 ![](https://img.kancloud.cn/bd/8a/bd8ab6eec5f404b1b8545463d74f430e_955x676.png) ``` // 聯動得點擊事件 scope.onOverlayItemClicked = function(ev,s) { // console.log(ev) var name = ev[0].properties.name.toString(); if (component.config.linkageDimension == null) { alert("未配置聯動維度"); return } // console.log(data) function findWithAttr(array, attr, value) { for(var i = 0; i < array.length; i += 1) { // console.log(array[i][attr]) if(array[i][attr] == value) { return i; } } } // console.log(component.config.linkageDimension.name) var dm = findWithAttr(data,component.config.mapFontColumn.name,name); console.log(data[dm]) var t = data[dm][component.config.linkageDimension.name]; console.log(t) console.log(scope.component.config.linkageDimension.name) scope.cacheDimensionValue(scope.component.config.linkageDimension.name, t); scope.notifyDimensionValueChange(null, scope.component.config.linkageDimension, t) if(component.config.tooltipShow){ console.log(component.config.showColumns) var gistooltip = "tooltip"+component.id; var x = parseInt(s.point.x)-100; var y = parseInt(s.point.y)+30; // console.log($("#"+gistooltip)) $("."+gistooltip).css({ "overflow":"hidden", "height":"auto", "position":"absolute", "padding":"10px", "z-index": "99999", "display":"block", "top":y+"px", "color":component.config.fontColor_tooltip, "background":component.config.bgColor_tooltip, "left":x+"px", "font-size":"14px", "border-radius":"5px" }); var html = '' for(var i = 0;i<component.config.showColumns.length;i++){ html+='<p style="line-height:20px;">'+component.config.showColumns[i].name+':'+data[dm][component.config.showColumns[i].name]+'</p>' } console.log(html) $("."+gistooltip).empty().html(html) } }; ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看