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

Maps: Styling TEI layers #106

Open
cooper-joe opened this issue May 19, 2020 · 5 comments
Open

Maps: Styling TEI layers #106

cooper-joe opened this issue May 19, 2020 · 5 comments

Comments

@cooper-joe
Copy link
Member

These are the proposed default layer styles for TEI layers in apps that display maps:
image

I've recorded my process here, feedback and discussion is very welcome.

Background

I have been looking into the default styles to apply to TEI layers. These styles will apply to both web and mobile map apps. Default styles will give the sense of consistency to maps across platforms.

There are various considerations to keep in mind when setting default styles. The styles need to:

  • be obviously different and not easily confused
  • work across multiple basemaps
  • help to understand relationship linking
  • be understandable for poor-sighted and color-blind users
  • cover most use-cases

Colors and shapes

I've researched color combinations using ColorBrewer, a fantastic tool for building color palettes for GIS visualizations (thanks @turban!). I used ColorBrewer to make a qualitative palette with 9 colors:
image

This color palette is marked ? for color-blind users on ColorBrewer, so I've investigated that below. I tested the palette on various map layers and adjusted for best results. Yellow, for example, does not display well.

The adjusted 9 color qualitative palette:
image

These colors work well for normal-sighted users. However, color-blind users will have difficulty telling them apart:
image

Low-quality mobile device screens may also present difficulties, especially when viewed in direct sunlight.

We can add contrast to the layer styles by using a set of shapes:
image

Shapes are assigned to each color for maximum contrast. Comparing the styles with and without shapes clearly shows the benefits they bring:
image

It would be possible for a user to customize these shapes and colors, of course. I think the best we can do is provide defaults that are accessible to as many people as possible.

Displaying shapes on a map

The shapes are slightly translucent in the middle. This, in theory, helps to better pinpoint the center of the shape. I'd like to test this further on device to see how successful this is.
image

I would also like to test the default size for the shapes. The best size for shapes may differ on web vs. mobile.

Relationships

Relationship styles inherit from the parent/linked shape:
image

In theory, the relationship styles are also customisable, but inheriting from the default styles should cover most use cases.

9+ layers

If a user adds more than 9 TEI layers the default styles will need to be recycled. The same color and shape combinations should not be used.

Examples in use

Here are examples of the default styles in use in different situations:

Default styles across all provided basemaps:
ss 2020-05-19 at 13 39 04
ss 2020-05-19 at 13 39 33
ss 2020-05-19 at 13 39 48
ss 2020-05-19 at 13 39 55
ss 2020-05-19 at 13 40 07

Relationship styles on all provided basemaps:
ss 2020-05-19 at 13 40 39
ss 2020-05-19 at 13 40 51
ss 2020-05-19 at 13 41 00
ss 2020-05-19 at 13 41 09
ss 2020-05-19 at 13 41 20

Buffer styles on all provided basemaps:
ss 2020-05-19 at 13 41 45
ss 2020-05-19 at 13 42 02
ss 2020-05-19 at 13 42 09
ss 2020-05-19 at 13 42 18
ss 2020-05-19 at 13 42 25

@cooper-joe
Copy link
Member Author

cooper-joe commented May 19, 2020

To-do:

  • How to display relationships with polygons?
  • Display TEI photos/icons
  • How do map markers look when a TEI is selected?

@cooper-joe
Copy link
Member Author

cooper-joe commented May 22, 2020

Displaying TEI photos and icons

Based on the work already done by the Android team, TEI photos and icons could be displayed like so:
image

@cooper-joe
Copy link
Member Author

Point -> Polygon relationships

Displaying a point to polygon relationship could be displayed like so:
image

In theory I think the best way to display this would be point -> closest point of the polygon. However, this may require too much calculation? If so, it could instead be point -> first point of the polygon. That may create some odd relationship links that cross over polygons though.

In this example the polygons are inheriting from the color styles defined above.

@cooper-joe
Copy link
Member Author

Selected / Hovered Points

Exploration of how points could react to being hovered (web only) or selected (mobile and web). Here is an mockup of a selected/hovered point and a selected/hovered relationship link:

image

image

Here is a live html/css demo of point hovering to help get a feel for it: http://jsfiddle.net/joe_dhis2/f256b4s7/37/

@turban
Copy link

turban commented Jun 21, 2020

Nice work @cooper-joe!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants