How can i change the color of the map? I used the @arcGIS/core for importing the map this is my code
this is my style.css
html,
body {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
font-feature-settings: "liga" 1, "calt" 0;
}
#root, .mapDiv {
padding: 0;
margin: 0;
width: 100%;
height: 500px;
display: flex;
letter-spacing: 0em;
line-height: 1.55rem;
background-color: gray;
}
this is my map code
....
import style from "../../component/css/style.css";
function MyMap(){
const mapDiv = useRef(style);
let cleanup;
useEffect(()=> {
if (mapDiv.current) {
esriConfig.apiKey = ">>>>>>>><<<<<<<<";
const map = new Map({
basemap: "arcgis-topographic" // Basemap layer service
});
const view = new MapView({
map: map,
container: mapDiv.current,
center: [-118.805, 34.027], // Longitude, latitude
zoom: 13, // Zoom level
style: {
background: {
type: "color",
color: [192, 192, 192, 0.4]
},
}
})
view.when((r)=> {
}).then(()=> {
mapDiv.current = view;
});
}
},[])
return (
<div className="mapDiv" ref={mapDiv}>
</div>
)
}
export default MyMap
result
from this line please dont read it from this line please dont read it
from this line please dont read it from this line please dont read it
from this line please dont read it from this line please dont read it
from this line please dont read it