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

Extra black legend icon for points #51

Closed
cpspicer opened this issue Aug 27, 2018 · 5 comments
Closed

Extra black legend icon for points #51

cpspicer opened this issue Aug 27, 2018 · 5 comments
Assignees
Labels
bug Something isn't working Product Launch Items that need to be resolved ahead of official Product Launch

Comments

@cpspicer
Copy link

Uploaded a KML file that had 2 styles. It was uploaded and parsed correctly, and added to an app. If you view the legend, you see a proceeding black box before the icon is displayed.

It's the classic BC Parks KML file used elsewhere in testing.

@cpspicer
Copy link
Author

capture

@NicoledeGreef
Copy link
Contributor

i also noticed this in the site i've been working on with uploaded JSON. if you play around with the color panels on the data upload screen those black symbols will change to the colors:

image

it'd be best to not include them with the custom marker.

@qqnluaq
Copy link
Contributor

qqnluaq commented Aug 27, 2018

This is a consequence of the code that does the rendering of the legend having no idea what sort of geometry the layer contains. The marker is for point features, but since the layer might contain lines or polygons too, the style chip for borders and fills is included too.

All vector data is encoded as geojson, and so each feature can be a different type of geometry. There's no assumption of uniformity.

One way to handle this is have the code determine what types of features are present.

Another way to is have style information separated for points, lines, and polygons. So there would be one style config for 0-D features, another for 1-D, and another for 2-D. If the style information is missing for a type of feature, then the feature (and legend) are just not rendered.

@NicoledeGreef
Copy link
Contributor

Did receive some feedback that the Legend was too deep (too many clicks to view it). For that site, I suggested including static legend information in the About page.

@qqnluaq
Copy link
Contributor

qqnluaq commented Jun 16, 2020

This has been fixed, the translink app shows an example:

https://bcgov.github.io/smk/debug/app/translink/?active-tool=layers&config={%22tools%22:[{%22type%22:%22layers%22,%22legend%22:false}]}

(Use https://qqnluaq.github.io/smk/ in URL if above doesn't work)

Toggle the legend button and you will see various legend icons on the layer items.

@NicoledeGreef NicoledeGreef transferred this issue from bcgov/smk-legacy-ui Jul 8, 2020
@NicoledeGreef NicoledeGreef added bug Something isn't working Product Launch Items that need to be resolved ahead of official Product Launch labels Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Product Launch Items that need to be resolved ahead of official Product Launch
Projects
No open projects
Development

No branches or pull requests

3 participants