Skip to content

Instantly share code, notes, and snippets.

@amyleew
Last active March 2, 2016 03:06
Show Gist options
  • Save amyleew/dbcc31c028c1be267050 to your computer and use it in GitHub Desktop.
Save amyleew/dbcc31c028c1be267050 to your computer and use it in GitHub Desktop.
Testing notes

Commander's Intent

Develop several core tests for GL Styles to guarantee uniform behavior across Mapbox style templates. Tests will produce either Mandatory failure or Optional / Best Practices warning depending on if it's an objective or subjective issue, as determined by the cartography team.

To start these will be for internal testing for our current default styles.

Once these are determined internally, they can be expanded to:

  • Customer facing as cli or github repo
  • Recommended tool for custom map design clients
  • Recommended/used by support team for HS trouble-shooting
  • Rolled into Studio for de-bugging / troubleshooting

Mandatory

Ensure data coverage (Streets v7)

  • tunnels, fords, bridges are styled separately or included in road styling
  • Require national_parks if parks are styled
  • Check that _link is included for motorway, primary, secondary, trunk if included in style
  • Require all fontstacks to have sufficient fonts or fallbacks for global coverage

Ensure proper layer order

  • bridges above roads above tunnels
  • waterway above water
  • any vector terrain layers should be below water
  • Correct order for scaleranks from the same subset (pois, place, country)

Prevent visual style errors

  • Check that highway_sheilds are set to line at z12+
  • Require separate style layer for disputed boundaries (because they need to look diff from actual boundaries)
  • No transparency in water layer (causes problems with overlapping polygons)
  • minor_rail is only styled if major_rail is styled
  • towns are only labeled if cities are labeled
  • All sprites used in style.json must be included and named respectively in spritesheet
    • Check all maki icons and included in each GL template style (including -11 or -15)
    • Check shield and rail icons against generated list based on tokens

Optional

Style optimization

  • Where file size can be saved in style.json
    • Flag fontstacks that have the same primary font but different fallbacks
    • Flag if style has >=5 fontstacks
    • Count spritesheets... is there a preformance issue? can we optimize these? What would help?
    • Optitimize ref groups ... check for layout properties (i.e. for road casing, etc.)
    • No round line caps or joins for thin lines (eg roads at low zooms) image
  • File size comparison between previous / other styles and the current one (< 150%)
  • ^^ how that relates to performance

Data warnings

  • Require all fontstacks to have sufficient fonts or fallbacks for global coverage

Style warnings

  • Check marine labels that are line geometries are styled with line placement
  • Check marine labels that are point geometries are styled with point placement
  • Check for standard sizes of icons (for internal style only ???)

Next actions

Next steps will be chatting with

  • Check all maki icons and included in each GL template style (including -11 or -15)
  • Check shield and rail icons against generated list based on tokens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment