Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

181
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda