Subset a layer to a polygon selection
select_withinCreate a new layer containing the source layer's features that lie within the supplied polygon. The source layer is untouched. Useful for "show me only the X inside this country/bbox/hand-drawn shape."
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map_id | Yes | ||
| rationale | Yes | Short audit-log label (≤300 chars) stating the user-facing goal this call serves, e.g. "add wildfire layer for the user's California query". Required on every call. Stored in the operations log so map edits stay traceable — we never see your chat history. | |
| selection | Yes | GeoJSON Polygon or MultiPolygon in [lng,lat] coordinate order. | |
| newLayerId | Yes | Id for the new layer. Must not already be in use in this workspace. | |
| inheritStyle | No | Default true. false emits a new layer with minimal default styling. | |
| sourceLayerId | Yes |