1 Answers1

0

Here is the solution I came up with using this Reddit forum which the author provided the proper url for Macrostrat.

Partial answer found at Reddit. - Giving credit where credit is due.

Macrostrat.org uses Open Street Map as a base, so I assumed the setup in Brutile in for Macrostrat could be modelled after the KnownTileSource for OpenStreet Map.

Steps:

  1. Using GitHub, I created my own fork of Brutile.

  2. Edited file: ..\BruTile/Predefined/KnownTileSources.cs

  3. Added new value of Macrostrat to public enum KnownTileSource.

  4. Added new method to public static class KnownTileSources

    private static readonly Attribution MacrostratAttribution = new Attribution( "© Macrostrat contributors", "https://macrostrat.org/#about");

  5. Modified existing method: public static HttpTileSource Create(...)

  6. Added the following case to the top of the switch statement:

    public static HttpTileSource Create(KnownTileSource source = KnownTileSource.OpenStreetMap, string apiKey = null, IPersistentCache<byte[]> persistentCache = null, Func<Uri, byte[]> tileFetcher = null, string userAgent = null) { switch (source) { case KnownTileSource.Macrostrat: return new HttpTileSource(new GlobalSphericalMercator(0, 18), "https://tiles.macrostrat.org/carto/{z}/{x}/{y}.png", new[] { "a", "b", "c" }, name: source.ToString(), persistentCache: persistentCache, tileFetcher: tileFetcher, attribution: MacrostratAttribution, userAgent: userAgent);

(Code unified diff using TortoiseGit)

enter image description here