-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added shield legend * Label networks using Wikidata * Link image instead of definition * Factored out templates, helper functions * Link to Wikidata query * Added place labels to legend * Group shields by country * Sort Other shields to bottom; scroll legend * Refactored symbol legends * Generate legend sections dynamically * Cleaned up legend layout Moved labels to the left of icons. Capped label width. Purge and refresh Wikidata query for network metadata whenever the language changes. * Documented Wikidata network item usage * Added urbanized areas to legend Generalized the symbol layer legending to display a swatch for fill layers. * Added state, country, continent to legend Flattened the label into the label table cell to keep it from overflowing. * Added parks to legend * Added lakes to legend * Added low-zoom lakes to legend * Added waterways to legend * Added ferry lines to legend * Fixed water confusion in legend Ferries are not rivers. * Added airport details to legend * Added buildings to legend * Simplified park layers * Removed debugging * Streamlined feature querying Pushed a layer list into each entry. This requires querying the map separately for each entry but avoids crosstalk. Replaced bespoke property matching with expression-based filters. * Simplified entry matching The entry wasn’t getting cloned anyways. * Added borders to legend * Added disputed borders to legend * Added freeways, toll roads to legend * Added highway exits to legend * Moved international shield category to top * Fixed text halo * Fixed non-capital filter * Added more road classes to legend * Added remaining road classes * Added driveways to legend * Added unpaved roads to legend * Added roads under construction to legend * Added railroads to legend * Moved legend config to separate file * Fixed build errors; sort shield rows Fixed build errors from moving sections into a separate configuration file. Sort shield rows in the same order as in the shield definitions, followed by unrecognized networks. * Added shield variants to legend * Updated documentation * Locale-aware sort countries * Singular descriptions in rail legend entries * Normalize country code case * Sentence-case Wikidata labels * Made colon after country code optional Some countries like Brazil simply use the country code alone for their national route network. * BAB is not a country * More kinds of recreational route networks * Typo in readme * Treat fake OMT network prefixes like real country prefixes * Special-case UK route types * Fetch UK network descriptions from Wikidata * Fixed error when text-field uses string interpolation syntax * Added comments * Italicize labels in legend based on font layout property * Added comments, tests Added inline comments throughout the less straightforward legend methods. Factored out shield image name parsing code and added tests of it. * Link networks to Wikidata * Removed special case for TLA recreational route networks * Removed unused UK label constants * Fixed coalescing of 0 values * Omit fully transparent roads from legend * Fixed typo in comment * Deleted redundant Kosovo shield * Simplified Australian shield assignment
- Loading branch information
Showing
21 changed files
with
1,439 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
"use strict"; | ||
|
||
import * as PlaceLayers from "../layer/place.js"; | ||
import * as LanduseLayers from "../layer/landuse.js"; | ||
import * as BoundaryLayers from "../layer/boundary.js"; | ||
import * as RoadLayers from "../layer/road.js"; | ||
import * as ConstructionLayers from "../layer/construction.js"; | ||
import * as HighwayExitLayers from "../layer/highway_exit.js"; | ||
import * as RailLayers from "../layer/rail.js"; | ||
import * as AerowayLayers from "../layer/aeroway.js"; | ||
import * as ParkLayers from "../layer/park.js"; | ||
import * as BuildingLayers from "../layer/building.js"; | ||
import * as WaterLayers from "../layer/water.js"; | ||
import * as FerryLayers from "../layer/ferry.js"; | ||
|
||
export const sections = [ | ||
{ | ||
name: "Populated places", | ||
entries: PlaceLayers.legendEntries, | ||
}, | ||
{ | ||
name: "Borders", | ||
entries: BoundaryLayers.legendEntries, | ||
}, | ||
{ | ||
name: "Roads", | ||
entries: [ | ||
...RoadLayers.legendEntries, | ||
...ConstructionLayers.legendEntries, | ||
...HighwayExitLayers.legendEntries, | ||
], | ||
}, | ||
{ | ||
id: "shields", | ||
name: "Route markers", | ||
source: "Wikidata", | ||
}, | ||
{ | ||
name: "Railroads", | ||
entries: RailLayers.legendEntries, | ||
}, | ||
{ | ||
name: "Aviation", | ||
entries: AerowayLayers.legendEntries, | ||
}, | ||
{ | ||
name: "Structures", | ||
entries: BuildingLayers.legendEntries, | ||
}, | ||
{ | ||
name: "Land use", | ||
entries: [...LanduseLayers.legendEntries, ...ParkLayers.legendEntries], | ||
}, | ||
{ | ||
name: "Water", | ||
entries: [...WaterLayers.legendEntries, ...FerryLayers.legendEntries], | ||
}, | ||
]; |
Oops, something went wrong.