You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/08/10 09:34:10 UTC

[GitHub] [echarts] litterBlackSnake opened a new issue #15503: 5.1.2地理坐标系和地图系列的 SVG 底图,vue中引入本地svg无法加载

litterBlackSnake opened a new issue #15503:
URL: https://github.com/apache/echarts/issues/15503


   ### Version
   5.1.2
   
   ### Steps to reproduce
   <template>
     <div
       style="width: 500px; height: 500px; background-color: sandybrown"
       ref="main"
     ></div>
   </template>
   <script>
   // import * as echarts from echarts;
   import * as echarts from 'echarts';
   // var echarts = require("echarts");
   export default {
     data() {
       return {};
     },
     mounted() {
       this.mapCharts();
     },
     methods: {
       mapCharts() {
         var myecharts = echarts.init(this.$refs.main);
         // var svg1 = "https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/geo/Beef_cuts_France.svg";
         var svg1 = "../assets/one/Beef_cuts_France.svg";
   
         $.get(svg1, function (svg) {
           echarts.registerMap("Beef_cuts_France", { svg: svg });
           let option = {
             tooltip: {},
             geo: {
               map: "Beef_cuts_France",
             },
           };
           myecharts.setOption(option);
         });
       },
     },
   };
   </script>
   <style lang="less" scoped>
   </style>
   ### Version
   5.1.2
   
   ### Steps to reproduce
   <template>
     <div
       style="width: 500px; height: 500px; background-color: sandybrown"
       ref="main"
     ></div>
   </template>
   <script>
   // import * as echarts from echarts;
   import * as echarts from 'echarts';
   // var echarts = require("echarts");
   export default {
     data() {
       return {};
     },
     mounted() {
       this.mapCharts();
     },
     methods: {
       mapCharts() {
         var myecharts = echarts.init(this.$refs.main);
         // var svg1 = "https://cdn.jsdelivr.net/gh/apache/echarts-website@asf-site/examples/data/asset/geo/Beef_cuts_France.svg";
         var svg1 = "../assets/one/Beef_cuts_France.svg";
   
         $.get(svg1, function (svg) {
           echarts.registerMap("Beef_cuts_France", { svg: svg });
           let option = {
             tooltip: {},
             geo: {
               map: "Beef_cuts_France",
             },
           };
           myecharts.setOption(option);
         });
       },
     },
   };
   </script>
   <style lang="less" scoped>
   </style>
   
   ### What is expected?
   引入本地svg可以成功渲染
   
   ### What is actually happening?
   无法渲染报错
   
   ### What is expected?
   引入本地svg可以成功渲染
   
   ### What is actually happening?
   无法渲染报错
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] plainheart commented on issue #15503: 5.1.2地理坐标系和地图系列的 SVG 底图,vue中引入本地svg无法加载

Posted by GitBox <gi...@apache.org>.
plainheart commented on issue #15503:
URL: https://github.com/apache/echarts/issues/15503#issuecomment-896532538


   应该是引用的本地 SVG 地址不对。请再仔细检查看看。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] echarts-bot[bot] commented on issue #15503: 5.1.2地理坐标系和地图系列的 SVG 底图,vue中引入本地svg无法加载

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #15503:
URL: https://github.com/apache/echarts/issues/15503#issuecomment-895880590






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org