Skip to content

Commit

Permalink
Add an option to force the highest fidelity instead of high for tacti…
Browse files Browse the repository at this point in the history
…cal symbols (forces all text modifiers)
  • Loading branch information
ComBatVision committed Oct 25, 2024
1 parent ef1d8c9 commit 4866b34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repositories {
}
dependencies {
implementation 'earth.worldwind:worldwind:1.5.26'
implementation 'earth.worldwind:worldwind:1.5.27'
}
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {

allprojects {
group = "earth.worldwind"
version = "1.5.26"
version = "1.5.27"

extra.apply {
set("minSdk", 21)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ open class MilStd2525LevelOfDetailSelector : Placemark.LevelOfDetailSelector {
placemark.attributes = getPlacemarkAttributes(simpleCode, symbolAttributes = getAttributes(placemark))
lastLevelOfDetail = MEDIUM_LEVEL_OF_DETAIL
}
} else if (!placemark.isHighlighted) {
} else if (!placemark.isHighlighted && !isForceAllModifiers) {
// High-fidelity: use the regular SIDC code without text modifiers, except unique designation (T)
if (lastLevelOfDetail != HIGH_LEVEL_OF_DETAIL || isInvalidateRequested) {
val basicModifiers = placemark.symbolModifiers?.filter { (k,_) -> k == "T" }
Expand Down Expand Up @@ -85,6 +85,10 @@ open class MilStd2525LevelOfDetailSelector : Placemark.LevelOfDetailSelector {
?: getUnfilledAttributes(placemark.symbolCode)

companion object {
/**
* Always use the highest fidelity instead of high (forces all text modifiers)
*/
var isForceAllModifiers = false
protected const val NORMAL_SCALE = 1.0
protected const val HIGHLIGHTED_SCALE = 1.3
protected const val LOW_LEVEL_OF_DETAIL = 0
Expand Down

0 comments on commit 4866b34

Please sign in to comment.