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

93
Visualizações
Geometry rings polygon json API in React Leaflet

I want to ask that if the JSON Syntax arcgis is written correctly, but later I will use type: Polygon data from the API. Is it correct in the coding part of the rings?

Syntax:

{
  "hasZ" : true | false,
  "hasM" : true | false,
  "rings": [
             [[<x11>,<y11>,<z11>,<m11>],[<x12>,<y12>,<z12>,<m12>], ... ,[<x1j>,<y1j>,<z1j>,<m1j>]],
             ... ,
             [[<xn1>,<yn1>,<zn1>,<mn1>],[<xn2>,<yn2>,<zn2>,<mn2>], ... ,[<xnk>,<ynk>,<znk>,<mnk>]]
           ],
  "spatialReference" : {"wkid" : <wkid>}
}

Source Syntax: Link 1 and Link 2

my coding

getTesOne(body)
                .then((response) => {
                    const array = [];
                    response.features.forEach((element) => {
                        array.push({
                            type: "Feature",
                            properties: element["attributes"],
                            geometry: {
                                type: "Polygon",
                                hasZ: true,
                                hasM: true,
                                rings: [
                                    [
                                        element["geometry"]["x"],
                                        element["geometry"]["y"],
                                        element["geometry"]["z"],
                                        element["geometry"]["m"],
                                    ]
                                ],
                            },
                        });
                    });

                    const FeatureCollection = {
                        type: "FeatureCollection",
                        features: array,
                    };
                    if (geoJsonLayer.current) {
                        geoJsonLayer.current.clearLayers().addData(FeatureCollection);
                    }
                    setData(FeatureCollection);
                })
                .catch((err) => console.log(err))
                .finally(() => setIsLoading(false)
            );

Is there any need to revise the rings section or something else?

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