Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda