Skip to content

Scope Taxon Pages to a tagged set of otus#258

Draft
kleintom wants to merge 2 commits intoSpeciesFileGroup:mainfrom
kleintom:geo_scope
Draft

Scope Taxon Pages to a tagged set of otus#258
kleintom wants to merge 2 commits intoSpeciesFileGroup:mainfrom
kleintom:geo_scope

Conversation

@kleintom
Copy link

@jlpereira The way I've been managing this is with two new config/api.yml variables, like

---
  url: http://localhost:3000/api/v1
  project_token: iPeStAVyejGKsUTEz1m2sw
  project_scope_tag_id: 176
  project_bounds: [[42.954076, -89.612263], [43.22005500557706, -89.18067925910802]]

where project_scope_tag_id: 176 is the id of the tag that your spatially-scoped otus were tagged with, and project_bounds are two opposite corners of a bounding box for your spatial area. The intention, per @proceps, is that the map still displays all of its normal (non-scoped) data, but is initially zoomed to the scoped area.

If there's a better way to do this, feel free to let me know or just take this one yourself.

@kleintom kleintom marked this pull request as draft March 10, 2025 20:13
@kleintom
Copy link
Author

Marking as draft pending final decisions on what to include/not include.

@jlpereira
Copy link
Member

jlpereira commented Mar 10, 2025

@kleintom Is it intended that VMap will always zoom the scoped area? This is a global component and could be used by users to create they own maps o new panels, applying this change will set the zoom always there. If this is intendend, then it's okay. Otherwise, bounds could be passes as bound prop to VMap from Panel Map(https://github.com/SpeciesFileGroup/taxonpages/tree/development/src/modules/otus/components/Panel/PanelMap)

@mjy
Copy link
Member

mjy commented Mar 10, 2025

project_bounds: [[42.954076, -89.612263], [43.22005500557706, -89.18067925910802]]

Let's try to explore a bounding geoJSON object.

Remember- TaxonPages config/implementation need to be kept as generic as possible so as to not require TaxonWorks APIs. This makes things like this specific use-case quite tricky (i.e. others may not know about our tag_id, and we therefor can't scope "external" pannels with it alone), however we need to try and adhere to the idea.

@jlpereira
Copy link
Member

project_bounds: [[42.954076, -89.612263], [43.22005500557706, -89.18067925910802]]

Let's try to explore a bounding geoJSON object.

Remember- TaxonPages config/implementation need to be kept as generic as possible so as to not require TaxonWorks APIs. This makes things like this specific use-case quite tricky (i.e. others may not know about our tag_id, and we therefor can't scope "external" pannels with it alone), however we need to try and adhere to the idea.

If project_bounds are going to be used just for PanelMap, then could be added to taxa_page.yml as panel prop I think

@kleintom
Copy link
Author

Is it intended that VMap will always zoom the scoped area?

Good point, thanks, it probably should only apply to Panel Map.

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.

3 participants