Plugin Contributor
hupe13
(@hupe13)
Do you mean leaflet-polygon? The options are the same as leaflet-line:
And the following Shape Options. See https://leafletjs.com/reference.html#path for details. ‘stroke’, ‘color’, ‘weight’, ‘opacity’, ‘lineCap’, ‘lineJoin’, ‘dashArray’, ‘dashOffset’ ‘fill’, ‘fillColor’, ‘fillOpacity’, ‘fillRule’, ‘className’
Try fillOpacity.
-
This reply was modified 12 hours, 20 minutes ago by
hupe13.
thank you I tried the option you linked. I want to control transparency in the geojson file. I applied fillOpacity=1 . But this option worked. What error am I getting?
[leaflet-geojson fillOpacity=1 fillColor=”white” color=”white” weight=0 src=”https://www.geotv1.com/wp-content/uploads/2023/11/Northern Hemisphere-Glacier Change-MIS4- 2.geojson”]{time}-{mis}[/leaflet-geojson][markerClusterGroup disableClusteringAtZoom=1 feat=”properties.time ” strings=”45 ka, 40 ka, 35 ka, 30 ka, 20 ka” groups=”45 ka, 40 ka, 35 ka, 30 ka, 20 ka”]
I think I have half of it figured out. The polygon is initially opaque but becomes translucent when you hover the mouse over it. Is there a way to make it opaque even when I hover the mouse over it?
Plugin Contributor
hupe13
(@hupe13)
leaflet-geojson has the same options:
adjust the transparency of a polygon?
You can adjust the transparency with fillOpacity as I wrote. The value is between 0 and 1, default is 0.2.
I want to remove the borderline of the polygon
Set stroke=false. For example:
[leaflet-geojson src=/url/to/your/file.geojson fillOpacity=0.5 stroke=false]If you hover the polygon, opacity changes and if you hover out, it changes back.
-
This reply was modified 1 hour, 14 minutes ago by
hupe13.
Thank you for your kind reply. It works now.
-
This reply was modified 14 minutes ago by
teddyyun.
