protomaps / basemaps

Basemap PMTiles generation and cartographic styles for OpenStreetMap data and more
https://maps.protomaps.com/
Other
378 stars 49 forks source link

Road shields for Hawaii show with US interstate artwork #86

Closed nvkelso closed 1 year ago

nvkelso commented 1 year ago

Instead of testing the network value for contains("I "), it should be startsWith("I "), else it catches networks like HI XXXX in error. My bad as a newbie to Java but easy to fix.

For example:

image

https://github.com/protomaps/basemaps/blob/main/tiles/src/main/java/com/protomaps/basemap/layers/Roads.java#L40-L45

if (shieldText.contains("US ")) {
          shieldText = shieldText.replaceAll("US ", "");
          networkVal = "US:US";
        } else if (shieldText.contains("I ")) {
          shieldText = shieldText.replaceAll("I ", "");
          networkVal = "US:I";
        } else {
          // This should be replaced by walking the way's relations (which reliably set network)
          networkVal = "other";
        }