refactor HedgeLayer component to move paint options into options prop
This commit is contained in:
@@ -19,16 +19,16 @@ export default function HedgeLayer() {
|
|||||||
geojson={geojson}
|
geojson={geojson}
|
||||||
type="line"
|
type="line"
|
||||||
insertBeforeLayer="waterway-name"
|
insertBeforeLayer="waterway-name"
|
||||||
paint={{
|
|
||||||
"line-color": "#4caf50",
|
|
||||||
"line-width": 6,
|
|
||||||
"line-opacity": 0.9,
|
|
||||||
}}
|
|
||||||
options={{
|
options={{
|
||||||
layout: {
|
layout: {
|
||||||
"line-cap": "round",
|
"line-cap": "round",
|
||||||
"line-join": "round",
|
"line-join": "round",
|
||||||
},
|
},
|
||||||
|
paint: {
|
||||||
|
"line-color": "#4caf50",
|
||||||
|
"line-width": 6,
|
||||||
|
"line-opacity": 0.9,
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user