Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
Can't edit the color of them map using arcgis-core react

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

enter image description here

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!