Skip to content

Conversation

@ShubhamSharmaFAO
Copy link

Feature: WebMapTileService GetFeatureInfo support & specs

Description

Adds WMTS GetFeatureInfo (feature picking) to WebMapTileServiceImageryProvider:

  • New options: enablePickFeatures (default true), getFeatureInfoFormats, getFeatureInfoUrl, getFeatureInfoParameters.
  • Implements pickFeatures via UrlTemplateImageryProvider + GetFeatureInfoFormat; supports both KVP and REST templating.
  • Honors dimensions and time-dynamic values; supports JSON/XML/HTML with format fallback.
  • Non‑breaking: default behavior enables picking; existing imagery fetching unchanged.
  • Provides GetFeatureInfo for WMTS imagery layers.

Issue number and link

  • Discussion: https://github.com/TerriaJS/terriajs/discussions/7603

Testing plan

  • Lint/build/docs/types
npm run eslint
npm run build
npm run build-docs
npm run build-ts
  • Targeted unit suite
npm run test -- --includeName WebMapTileServiceImageryProvider
  • Verifies:
    • Disabled states: empty getFeatureInfoFormats, enablePickFeatures=false
    • Initialization for KVP and REST URLs
    • getFeatureInfoUrl override used for picking
    • Request construction (service/version/request/layer/style/tilematrixset/tilematrix/tilecol/tilerow/i/j/infoformat)
    • Dimensions in KVP (query) and REST (template) forms
    • Time-dynamic values in query and template (with URL-encoding)
    • getFeatureInfoParameters lowercased into query
    • JSON parsing to ImageryLayerFeatureInfo[] with name/position checks
    • XML (fetchXML) and HTML (fetchText) infoformats
    • Fallback to next format when the first request fails

Author checklist

  • I have submitted a Contributor License Agreement
  • I have added my name to CONTRIBUTORS.md
  • I have updated CHANGES.md with a short summary of my change
  • I have added or updated unit tests to ensure consistent code coverage
  • I have updated the inline documentation, and included code examples where relevant
  • I have performed a self-review of my code

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.

1 participant