我想在Leaflet.TimDimension的 "GeoJSON基本用法 "示例中改变路径线的颜色和权重。
http:/apps.socib.esLeaflet.TimeDimensionexamplesexample17.html。
我已经去了他们的网站,但找不到任何东西,或者是看多了。我找到的唯一一个有描边选项的东西是在例子8中 (http:/apps.socib.esLeaflet.TimeDimensionexamplesexample8.html。).
我还在下载的GIT仓库中多文件搜索了一下stroke,只找到了#8的例子。
我把mapline放大后检查了一下代码,发现stroke和width是在哪里生成的。
<path class="leaflet-interactive" stroke="#3388ff" stroke-opacity="1" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none" d="M1034 157L1026 160L619 205L561 70L608 2L711 445L650 599L585 680L508 770"></path>
我主要是想不显示路径线或者自己设置宽度和stoke。
我想出了一个风格的黑客
<style>
.leaflet-pane > svg path.leaflet-interactive {
border-width: 0px !important; /* optional */
stroke: rgb(0, 0, 0) !important; /* color */
stroke-opacity: .5 !important; /* transparency */
stroke-width: 0 !important; /* line width */
stroke-linecap: round !important; /* */
stroke-linejoin: round !important /* */
}
</style>
在设置插件javascript的时候,还在寻找一种方法。