android_packages_apps_GmsCore/artwork/styles
2023-09-21 11:28:45 +02:00
..
fonts Fix font issue causing tiles not to load 2023-08-29 11:30:56 +02:00
sprite_sources New styles for use with OpenMapTiles and Stadia 2023-08-29 11:30:56 +02:00
README.md Add command to copy styles to appropriate locations to README 2023-08-29 11:30:56 +02:00
style-mapbox-outdoors-v12.json Add command to copy styles to appropriate locations to README 2023-08-29 11:30:56 +02:00
style-microg-normal-mapbox.json New styles for use with OpenMapTiles and Stadia 2023-08-29 11:30:56 +02:00
style-microg-normal-openmaptiles.json Force no POI to show at zoom <= 14 2023-09-21 11:28:45 +02:00
style-microg-normal-stadia.json Force no POI to show at zoom <= 14 2023-09-21 11:28:45 +02:00
style-microg-satellite-mapbox.json Stadia satellite style 2023-08-29 11:30:56 +02:00
style-microg-satellite-stadia.json Align POI label colors and improve ledgebility of borders 2023-09-21 11:28:45 +02:00
style-stadia-outdoors.json Add stadia outdoor style with metadata 2023-08-29 11:30:56 +02:00

The files

  • style-microg-normal-openmaptiles.json is a pure OpenMapTiles schema version of microG's custom style. The sources are set to Stadia but could be modified to be used with another schema-compliant vendor, e.g. MapTiler.

  • style-microg-normal-stadia.json is a variant with Stadia custom layers.

  • style-microg-normal-mapbox.json is a historic, unmaintained variant for use with Mapbox.

  • style-microg-satellite-*.json is the same, but with a satellite layer (the stadia variant is almost pure openmaptiles, but openmaptiles does not specify a satellite layer).

  • style-stadia-outdoors.json is identical to Stadia's Outdoors style, but with added microG metadata.

  • sprite_sources files can be generated to a single sprite file as found in the app's assets using spreet (see below).

  • PBF files for fonts can be generated using build_pbf_glyphs from the fonts folder.

Resources

For creating styles

Vendor-specific

For converting assets

Commands:

$ cp style-microg-{satellite,normal}-{mapbox,stadia}.json style-stadia-outdoors.json style-mapbox-outdoors-v12.json ../../play-services-maps-core-mapbox/src/main/assets/
$ spreet sprite_sources/ ../../play-services-maps-core-mapbox/src/main/assets/sprites
$ spreet --retina sprite_sources/ ../../play-services-maps-core-mapbox/src/main/assets/sprites@2x
$ build_pbf_glyphs --overwrite -c fonts/combinations.json fonts/ ../../play-services-maps-core-mapbox/src/main/assets
$ rm -r ../../play-services-maps-core-mapbox/src/main/assets/OpenSans\ Regular # remove temporary files
  • We combine Open Sans Regular with Roboto Regular so that no glyphs are missing.
  • A symbolic link in the assets folder points from the font stack specification "Open Sans Regular,Arial Unicode MS Regular" to "Roboto Regular". It is unclear why MapLibre sometimes tries to access this font and fails rendering entire tiles if it is not present.

The assets are referenced using asset:// in the style. For using Maputnik, it may be convenient to set the glyphs and sprites source to these Mapbox-hosted sources:

    "sprite": "mapbox://sprites/microg/cjui4020201oo1fmca7yuwbor/8fkcj5fgn4mftlzuak3guz1f9",
    "glyphs": "mapbox://fonts/microg/{fontstack}/{range}.pbf",