Closed nvkelso closed 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.
contains("I ")
startsWith("I ")
HI XXXX
For example:
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"; }
Instead of testing the network value for
contains("I ")
, it should bestartsWith("I ")
, else it catches networks likeHI XXXX
in error. My bad as a newbie to Java but easy to fix.For example:
https://github.com/protomaps/basemaps/blob/main/tiles/src/main/java/com/protomaps/basemap/layers/Roads.java#L40-L45