ArcGIS 4.28.10 JavaScript - Feature Layer not rendering full view

192
0
02-06-2024 03:06 PM
KarenArcoverde
New Contributor

We have a large view of the entire country of Brazil, and when we're zoomed out the Feature Layer isn't rendering completely.  If we zoom into smaller areas the view is correct, but at a zoomed out view it's very broken. I dont want to use  /next  version 4.16 isnt available and only available 4.17 to up

import OGCFeatureLayer from "@arcgis/core/layers/OGCFeatureLayer";
import { useGlobalContext } from "./VariablesContext";

function CellsLayer() {
  const { map } = useGlobalContext();
  var cellString = `{censured}`;
  const cellBase64 = btoa(cellString);
  const cellsymbol = {
    type: "picture-marker",
    url: "data:image/svg+xml;base64," + cellBase64,
    width: "50px",
    height: "50px",
  };

  let cellsRenderer = {
    type: "simple", // autocasts as new SimpleRenderer()
    symbol: cellsymbol,
    visualVariables: [
      {
        type: "rotation",
        field: "azimuth",
        rotationType: "geographic",
      },
      {
        type: "color",
        field: "height",
        stops: [
          { value: 50, color: "#05F551" },
          { value: 60, color: "#F50505" },
        ],
        legendOptions: {
          title: "Height",
        },
      },
    ],
  };
  const cellsLayer = new OGCFeatureLayer({
    url: "{censured}",
    collectionId: "{censured}",
    renderer: cellsRenderer,
  });
  if (map) {
    map.add(cellsLayer);
  }
}

export default CellsLayer;
0 Kudos
0 Replies