Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Tiles 4.14.7
------
- fix race condition in determining locale for high way shields [#586]

Tiles 4.14.6
------
- fix parsing of integers in feature matcher by @pekkine [#599]
Expand Down
2 changes: 1 addition & 1 deletion tiles/src/main/java/com/protomaps/basemap/Basemap.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public String description() {

@Override
public String version() {
return "4.14.6";
return "4.14.7";
}

@Override
Expand Down
7 changes: 4 additions & 3 deletions tiles/src/main/java/com/protomaps/basemap/layers/Roads.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ public String name() {
}

// Hardcoded to US for now
private CartographicLocale locale = new CartographicLocale();

private record RouteRelationInfo(
@Override long id,
Expand Down Expand Up @@ -340,7 +339,7 @@ private void processOsmHighways(SourceFeature sf, FeatureCollector features) {

String highway = sf.getString("highway");

CartographicLocale.Shield shield = locale.getShield(sf);
var locale = new CartographicLocale();

for (var routeInfo : sf.relationInfo(RouteRelationInfo.class)) {
RouteRelationInfo relation = routeInfo.relation();
Expand All @@ -354,9 +353,11 @@ private void processOsmHighways(SourceFeature sf, FeatureCollector features) {
code.ifPresent(s -> sf.setTag("pm:country", s));
locale = CountryCoder.getLocale(code);
} catch (GeometryException e) {
// do nothing
e.log("Failed to determine country code");
}

CartographicLocale.Shield shield = locale.getShield(sf);

var matches = osmKindsIndex.getMatches(sf);

String kind = getString(sf, matches, "pm:kind", "other");
Expand Down
Loading