<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                設計頁 搜索 case"grid": 添加下面代碼 如圖: ![](https://img.kancloud.cn/b8/33/b8334a6b9bde28aa6508fb39d0029d7a_1338x650.png) ``` 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+1) == undefined) { map.addSource(sourceId, { 'type': 'geojson', 'data': geojson }); map.addLayer({ 'id': layerId+1, 'source': sourceId, 'type': 'symbol', 'layout': { "text-field": "{weight}"+layer.mapNumberCompany, "text-font": ["SimSun Regular"], "text-size": parseInt(layer.mapFontSize), "text-offset": offset, }, 'paint': { "text-color": layer.mapFontColor } }); } else { map.getSource(sourceId).setData(geojson); map.setPaintProperty(layerId+1, 'text-color', layer.mapFontColor); map.setLayoutProperty(layerId+1, 'text-size', parseInt(layer.mapFontSize)); map.setLayoutProperty(layerId+1, 'text-offset', offset); } ``` 搜索 case"grid": 設置面板 如圖: ![](https://img.kancloud.cn/1d/d6/1dd6adae994a0dac4c7c99ea5443cba0_1023x624.png) ``` { title: '單位', type: "text-input-sl-s", bind: "mapNumberCompany", }, { 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 } }, ``` 設置監聽 搜索 component.config.mapFontSize 在下面寫 如圖: ![](https://img.kancloud.cn/c5/43/c54301b3766fc115163a2d1e5d10352b_1059x454.png) ``` scope.$watch("component.config.mapNumberCompany", function(newValue) { if (newValue != null) { factory.setLayerConfig(scope, component, "mapNumberCompany", newValue); } }); ``` 分享頁 搜索 case"grid": 添加下面代碼 如圖: ![](https://img.kancloud.cn/f1/ef/f1ef78a482197285d3af108700746114_1372x841.png) ``` 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+1) == undefined) { map.addSource(sourceId, { 'type': 'geojson', 'data': geojson }); map.addLayer({ 'id': layerId+1, 'source': sourceId, 'type': 'symbol', 'layout': { "text-field": "{weight}"+layer.mapNumberCompany, "text-font": ["SimSun Regular"], "text-size": parseInt(layer.mapFontSize), "text-offset": offset, }, 'paint': { "text-color": layer.mapFontColor } }); } else { map.getSource(sourceId).setData(geojson); map.setPaintProperty(layerId+1, 'text-color', layer.mapFontColor); map.setLayoutProperty(layerId+1, 'text-size', parseInt(layer.mapFontSize)); map.setLayoutProperty(layerId+1, 'text-offset', offset); } ``` 最后的效果 ![](https://img.kancloud.cn/dc/c6/dcc6d7d63f0bc58cc48ea4a7f28c05e3_1554x842.png)
                  <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>

                              哎呀哎呀视频在线观看