简体   繁体   English

jVectorMap样式更改填充类型

[英]jVectorMap styling change fill type

How would I style the "world_mill_en" map like this? 我将如何设置“ world_mill_en”地图的样式?

I know how to do the markers, just have to specify the longitude and latitude. 我知道如何做标记,只需要指定经度和纬度即可。 How would I get rid of all the dividing lines between the continents, and change the fill such that it's just a bunch of grey dots? 我将如何消除各大洲之间的所有分界线,并更改填充以使其只是一堆灰色点? As far as I know, the api only lets you change it to a solid fill. 据我所知,api仅允许您将其更改为实心填充。

Also, how do I disable region hovering? 另外,如何禁用区域悬停?

Use a pattern fill (with the image you want) for the region (doesn't require masking) 对区域使用图案填充(带有所需的图像)(不需要遮罩)

or 要么

Use a pattern fill on a rectangle that uses a mask with the region in it 在使用遮罩及其区域的矩形上使用图案填充

<svg xmlns="http://www.w3.org/2000/svg" 
 xmlns:xlink="http://www.w3.org/1999/xlink" 
 viewBox="0 0 1000 360">
 <defs>
    <pattern patternUnits="userSpaceOnUse" id="pat1" x="10" y="10" 
     width="425" height="319">
        <image width="425" height="319" 
         xlink:href="http://designm.ag/images/0709/wood/71.jpg" />
    </pattern>
    <text id="txt1" y="100" font-weight="bold" font-family="Verdana" 
     font-size="100">Some Text</text>
</defs>     

<use width="1000" height="400" xlink:href="#txt1" fill="url(#pat1)"/>
</svg>

Here's a fiddle showing how to do a simple pattern. 这是显示如何制作简单图案的小提琴

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM