Skip to content

feat: support GeoJSON FeatureCollection tiles - #91

Open
Komzpa wants to merge 1 commit into
masterfrom
codex/geojson-featurecollection
Open

feat: support GeoJSON FeatureCollection tiles#91
Komzpa wants to merge 1 commit into
masterfrom
codex/geojson-featurecollection

Conversation

@Komzpa

@Komzpa Komzpa commented May 8, 2026

Copy link
Copy Markdown
Member

Summary

  • accept GeoJSON FeatureCollection tile payloads by normalizing wrapped Feature.geometry objects into Kothic's existing feature shape
  • keep existing Kothic tile payloads unchanged
  • normalize Leaflet JSON responses before Y-axis inversion so wrapped GeoJSON features can render and remain clickable

Fixes #67.

Validation

  • npm test

@Komzpa
Komzpa force-pushed the codex/geojson-featurecollection branch 2 times, most recently from 1dfb051 to 987d758 Compare May 8, 2026 15:04
@Komzpa
Komzpa marked this pull request as ready for review May 17, 2026 16:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 987d758313

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread dist/kothic-leaflet.js
done(error, canvas);
}

data = Kothic.normalizeData(data);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve normalized payload for subclass consumers

Rebinding data to Kothic.normalizeData(data) creates a new object for GeoJSON FeatureCollection inputs, but L.TileLayer.Kothic.Clickable._onKothicDataResponse (in dist/kothic-leaflet-clickable.js) still reads the original argument after calling the parent method. In that path, features remain type: "Feature" with nested geometry, so the clickable layer stores no point features and featureclick stops working for GeoJSON tiles. This regression occurs specifically when using the clickable layer with wrapped GeoJSON features.

Useful? React with 👍 / 👎.

Signed-off-by: Darafei Praliaskouski <me@komzpa.net>
@Komzpa
Komzpa force-pushed the codex/geojson-featurecollection branch from 987d758 to 3bf7a62 Compare May 20, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GEOJson support

1 participant