Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Big layer freeze the UI #2565

Open
1 task done
jolevesq opened this issue Oct 25, 2024 · 0 comments · May be fixed by #2674
Open
1 task done

[BUG] Big layer freeze the UI #2565

jolevesq opened this issue Oct 25, 2024 · 0 comments · May be fixed by #2674

Comments

@jolevesq
Copy link
Member

jolevesq commented Oct 25, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When we add 1dcd28aa-99da-4f62-b157-15631379b170, thee UI behaves weirdly. At some point the whole page freeze.

It happens when details tries to query features info. We should be able to handle these request without affecting the UI.

When we click on bunch of points, these 2 layers came in error
image

seems to hang on in deflate.js

/**
 * @param {Array<number>} flatCoordinates Flat coordinates.
 * @param {number} offset Offset.
 * @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
 * @param {number} stride Stride.
 * @return {number} offset Offset.
 */
export function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {
  for (let i = 0, ii = coordinate.length; i < ii; ++i) {
    flatCoordinates[offset++] = coordinate[i];
  }
  return offset;
}

This came from the reading of feature for ESRI in gv-dynamic

identifyUrl =
        `${identifyUrl}identify?f=json&tolerance=${this.hitTolerance}` +
        `&mapExtent=${extent.xmin},${extent.ymin},${extent.xmax},${extent.ymax}` +
        `&imageDisplay=${size[0]},${size[1]},96` +
        `&layers=visible:${layerConfig.layerId}` +
        `&layerDefs=${layerDefs}` +
        `&returnFieldName=true&sr=4326&returnGeometry=true` +
        `&geometryType=esriGeometryPoint&geometry=${lnglat[0]},${lnglat[1]}`;

      const response = await fetch(identifyUrl);
      const jsonResponse = await response.json();

We should use the maxAllowableOffset parameter in the url

Expected Behavior

UI should NEVER freeze

Steps To Reproduce

  1. https://canadian-geospatial-platform.github.io/geoview/public/demos-navigator.html?config=./configs/navigator/19-geojson.json
  2. Go to layers panel and add 1dcd28aa-99da-4f62-b157-15631379b170
  3. Play with map, click on features. At some point, page will freeze

Anything else?

No response

jolevesq added a commit that referenced this issue Nov 1, 2024
…con (#2567)

* fix(ui): Toggle class visibility, legend class border and wms stack icon
Closes #2550, #2565, #2556

* fix comment layers

* Remove tooltip

* Remove tooltip format
@jolevesq jolevesq self-assigned this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant