Skip to content
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

Reactive Presence Data Property — Display Caveats #10

Open
1 of 2 tasks
gcmillar opened this issue Sep 5, 2020 · 3 comments
Open
1 of 2 tasks

Reactive Presence Data Property — Display Caveats #10

gcmillar opened this issue Sep 5, 2020 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@gcmillar
Copy link
Contributor

gcmillar commented Sep 5, 2020

Reactive Presence Data Property — Display Caveats

Presence data property now reactive, dynamically displayed on yearly basis. Since presence property is binary, display driven by boolean-based function, reading 'true' / 'false' yearly, displaying icon if / when 'true' is red. See commit and gif:

app build status

There are caveats / issues remaining:

  • 1.svg loses coloring when loaded into the dashboard (potentially have @shannonkjones look into this?)
    • current build now using "PoPS" bug icon (imo: PoPS .svg >>> slf .svg) current build]
  • 2. multiple pest icons displayed for single countries, instead of one icon (e.g., at center of country) (see below example)
    • could potentially be simple layer styling issues (i.e. Mapbox Studio) that I am just unaware of
      • will continue looking into
      • see figure below :  


        app build status
        Figure shows how icons are added to each separated polygon, even if belonging to same, single country. Seemingly occurs when country's polygon/vector boundaries become split into separate territories (based on geojson coordinates), then treated as new region(s) to display pest presence.


Wait for @ChrisJones687's thoughts to proceed?

@gcmillar gcmillar added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Sep 5, 2020
@shannonkjones
Copy link
Member

@gcmillar To clarify: the SLF.svg is converted to a black image, but the PoPS.svg displays with colors?

(1) Are they being loaded identically?
(2) Pure speculation: It is possible that the SLF vector is just too complicated to be displayed at that small size. MapBox may automatically convert to a solid version of the sprite if the vector details can not be resolved for the given image size and screen resolution.

My troubleshooting strategy would be to make a VERY simple svg (maybe try an SLF outline with single fill color). If that works, then I think you could try adding a little bit more detail (if desired). If you need help, let me know.

@shannonkjones
Copy link
Member

@gcmillar I happened across this and think it may be useful. https://docs.mapbox.com/help/troubleshooting/studio-svg-upload-errors/

@gcmillar
Copy link
Contributor Author

gcmillar commented Sep 10, 2020

@shannonkjones Thank you !! I did actually end up using that process a few days ago, but for the green PoPS icon. I did try it with the SLF icon at first but didn't have any luck with it. I'll definitely revisit soon after the meeting tomorrow.

Relatedly, issue 2 (above) has now been fixed. I was able to calculate the centroids for all countries, and create a function to overwrite the default icon anchor position, to instead display only one icon per country, at the respective country's centroid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants