Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
543 views
in Technique[技术] by (71.8m points)

javascript - 我想更改传单中一层的图标颜色,我有两点,所有层均显示为蓝色默认图标(I want to change the icon color of one layer in leaflet, I have two point ,layers all appearing as blue default icons)

I have two points layers as Geojson files that I added to my leaflet map.

(我有两个点图层作为我添加到传单地图中的Geojson文件。)

The issue is that they all appear as the blue default icon.

(问题是它们都显示为蓝色的默认图标。)

I want to change one to red.

(我想将其更改为红色。)

How do I do this?

(我该怎么做呢?)

Code

()

 <body> <h1>Settlement Map</h1> <div id="map"> <script> var map = L.map('map').setView([-34.06001, 18.66321], 13); var addressLayer = L.geoJSON(address, { color: 'red' }).addTo(map); var EPLayer = L.geoJSON(EP).addTo(map); </script> </div> <body/> 

  ask by kgwarishi malatji translate from so


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...