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 2020/10/06 15:04:24 UTC

[GitHub] [incubator-echarts] plainheart commented on issue #4537: echarts3.x 还能像echarts2.x那样,支持svg的地图扩展吗?

plainheart commented on issue #4537:
URL: https://github.com/apache/incubator-echarts/issues/4537#issuecomment-704333342


   目前似乎可以通过 `echarts.registerMap` 注册所需的 svg 扩展地图,然后在 `series.map` 中使用即可。
   
   ```js
   $.get('football.svg', function (svg) {
     echarts.registerMap('football', {
        svg: svg
     }
   });
   ```
   
   mapbox 也提供了一个 svg 转 geoJSON 的插件:[svg-to-geojson](https://github.com/mapbox/svg-to-geojson)
   不过转换出来只是结构,不包含样式。


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

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