allow using label grid on lines and polygons too (#51)

This commit is contained in:
Michael Barry
2022-01-09 12:02:46 -05:00
committed by GitHub
parent 496d4f21ee
commit e5577b5369
4 changed files with 5 additions and 5 deletions

View File

@@ -100,7 +100,7 @@ public class MountainPeak implements
// any label grid squares which could lead to inconsistent label ranks for a feature
// in adjacent tiles. postProcess() will remove anything outside the desired buffer.
.setBufferPixels(100)
.setPointLabelGridSizeAndLimit(13, 100, 5);
.setLabelGridSizeAndLimit(13, 100, 5);
}
}

View File

@@ -115,7 +115,7 @@ public class Park implements
features.centroid(LAYER_NAME).setBufferPixels(256)
.setAttr(Fields.CLASS, clazz)
.putAttrs(LanguageUtils.getNames(element.source().tags(), translations))
.setPointLabelGridPixelSize(14, 100)
.setLabelGridPixelSize(14, 100)
.setSortKey(SortKey
.orderByTruesFirst("national_park".equals(clazz))
.thenByTruesFirst(element.source().hasTag("wikipedia") || element.source().hasTag("wikidata"))

View File

@@ -350,10 +350,10 @@ public class Place implements
.setAttr(Fields.RANK, rank)
.setMinZoom(minzoom)
.setSortKey(getSortKey(rank, placeType, element.population(), element.name()))
.setPointLabelGridPixelSize(12, 128);
.setLabelGridPixelSize(12, 128);
if (rank == null) {
feature.setPointLabelGridLimit(LABEL_GRID_LIMITS);
feature.setLabelGridLimit(LABEL_GRID_LIMITS);
}
if ("2".equals(capital) || "yes".equals(capital)) {

View File

@@ -174,7 +174,7 @@ public class Poi implements
.setAttr(Fields.LEVEL, Parse.parseLongOrNull(element.source().getTag("level")))
.setAttr(Fields.INDOOR, element.indoor() ? 1 : null)
.putAttrs(LanguageUtils.getNames(element.source().tags(), translations))
.setPointLabelGridPixelSize(14, 64)
.setLabelGridPixelSize(14, 64)
.setSortKey(rankOrder)
.setMinZoom(minzoom(element.subclass(), element.mappingKey()));
}