-
Notifications
You must be signed in to change notification settings - Fork 0
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
Trial render bulk polygons #276
base: main
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for reactol failed.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Overview
This PR introduces a trial implementation for rendering a large body of polygons by adding support for multi-zone features. Key changes include:
- Creation of a new MultiZone component to render multi-polygon features.
- Addition of a loader (loadRepPolygon) to parse and convert polygon data from .rep files into GeoJSON features.
- Updates to document loading, constants, layers, types, and the map component to support multi-zone functionality.
Reviewed Changes
File | Description |
---|---|
src/components/spatial/MultiZone/index.tsx | New component for rendering multi-polygon zones. |
src/helpers/loaders/loadRepPolygon.ts | New loader for parsing polygon data from .rep files and creating a feature. |
src/components/Document/index.tsx | Added new file handler support for rep polygon files. |
src/constants.ts | Introduced MULTI_ZONE_TYPE constant. |
src/components/Layers/index.tsx | Integrated Multi Zones into the layers panel with a new icon. |
src/types.ts | Added MultiZoneProps type for multi-zone features. |
src/components/spatial/Map/index.tsx | Updated map to render MultiZone features based on GeoJSON MultiPolygon. |
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
const points: Array<{lat: number, lng: number}> = [] | ||
|
||
// Process 5 coordinate pairs | ||
for (let i = 0; i < 6; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loop is set to iterate 6 times to process coordinate pairs, but earlier comments and a parts length check suggest processing 5 coordinate pairs. Adjust the loop condition to 'i < 5' or update the parts length validation to ensure consistency.
for (let i = 0; i < 6; i++) { | |
for (let i = 0; i < 5; i++) { |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
# Conflicts: # src/components/Document/index.tsx # src/types.ts
Trial displaying large body of polygons