Merge two svg path elements programmatically

前端 未结 2 506
失恋的感觉
失恋的感觉 2021-01-04 14:24

I am rendering a map out of SVG paths (using jVectormap).

There are cases where one region has to be merged with the neighboring region.

Unfortunately both r

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-04 14:41

    I haven't tried this, but you may get around it by running the converter at jVectormap with the following parameters:

    --buffer_distance=0
    --where="ISO='region_1' OR ISO='region_2'"
    

    Where region_1 and region_2 are the two regions that you need to merge.

    Solving the problem this way also means that the generated SVG paths are true to the original coordinates, whereas a following fix may lead to some (probably minor) inconsistencies.

提交回复
热议问题