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

95
Vistas
Anillos de geometría polígono json API en React Leaflet

Quiero preguntar si JSON Syntax arcgis está escrito correctamente, pero luego usaré type: Polygon data de la API. ¿Es correcto en la parte de codificación de los rings ?

Sintaxis:

 { "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>} }

Sintaxis de origen: Enlace 1 y Enlace 2

mi codificación

 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) );

¿Hay alguna necesidad de revisar la sección de rings o algo más?

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