以编程方式合并两个svg路径元素 [英] Merge two svg path elements programmatically

查看:634
本文介绍了以编程方式合并两个svg路径元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用,带有以下参数:

   -  buffer_distance = 0 
- 其中=ISO ='re gion_1'OR ISO ='region_2'

其中 region_1 region_2 是您需要合并的两个区域。



通过这种方式解决问题也意味着生成的SVG路径对原始坐标是真的,而后续修复可能会导致一些(可能是次要的)不一致。


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 regions don't touch each other and I have to interpolate to fill the space in between.

jVectormap uses very simple SVG paths with M to set the the absolute startpoint and l to connect relative points.

Does any of the SVG libraries cover such an operation?

解决方案

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.

这篇关于以编程方式合并两个svg路径元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆