Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: 2.0.6 #623

Merged
merged 5 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog for Open Mobile Maps

## Version 2.0.6 (10.04.2024)
- log exception when a font can not be loaded

## Version 2.0.5 (08.04.2024)
- Expose thread_pool_callbacks in scheduler interface
- call onRemoved on layerInterface before the mapScene is destroyed
Expand Down
4 changes: 2 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ SNAPSHOT_REPOSITORY_URL=https://oss.sonatype.org/content/repositories/snapshots/

GROUP=io.openmobilemaps
POM_ARTIFACT_ID=mapscore
VERSION_NAME=2.0.5
VERSION_CODE=2000500
VERSION_NAME=2.0.6
VERSION_CODE=2000600

POM_NAME=mapscore
POM_PACKAGING=aar
Expand Down
2 changes: 1 addition & 1 deletion ios/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ For App integration within XCode, add this package to your App target. To do thi
Once you have your Swift package set up, adding Open Mobile Maps as a dependency is as easy as adding it to the dependencies value of your Package.swift.
```swift
dependencies: [
.package(url: "https://github.com/openmobilemaps/maps-core.git", .upToNextMajor(from: "2.0.5"))
.package(url: "https://github.com/openmobilemaps/maps-core.git", .upToNextMajor(from: "2.0.6"))
]
```

Expand Down
2 changes: 1 addition & 1 deletion shared/src/MapsCoreSharedModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@

#include "MapsCoreSharedModule.h"

std::string MapsCoreSharedModule::version() { return "2.0.5"; }
std::string MapsCoreSharedModule::version() { return "2.0.6"; }
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "Tiled2dMapSource.h"
#include "Tiled2dMapVectorStyleParser.h"
#include "CollisionUtil.h"
#include "ExceptionLogger.h"

Tiled2dMapVectorSymbolObject::Tiled2dMapVectorSymbolObject(const std::weak_ptr<MapInterface> &mapInterface,
const std::shared_ptr<Tiled2dMapVectorLayerConfig> &layerConfig,
Expand Down Expand Up @@ -106,7 +107,7 @@ Tiled2dMapVectorSymbolObject::Tiled2dMapVectorSymbolObject(const std::weak_ptr<M
// only load the font if we actually need it
if (hasText) {

std::shared_ptr<FontLoaderResult> fontResult;
std::shared_ptr<FontLoaderResult> fontResult = nullptr;

for (const auto &font: fontList) {
// try to load a font until we succeed
Expand All @@ -124,26 +125,37 @@ Tiled2dMapVectorSymbolObject::Tiled2dMapVectorSymbolObject(const std::weak_ptr<M
}
}


auto textOffset = description->style.getTextOffset(evalContext);
const auto textRadialOffset = description->style.getTextRadialOffset(evalContext);
const auto letterSpacing = description->style.getTextLetterSpacing(evalContext);

SymbolAlignment labelRotationAlignment = description->style.getTextRotationAlignment(evalContext);
boundingBoxRotationAlignment = labelRotationAlignment;
labelObject = std::make_shared<Tiled2dMapVectorSymbolLabelObject>(converter, featureContext, description, text, fullText,
coordinate, lineCoordinates, textAnchor, angle,
textJustify, fontResult, textOffset, textRadialOffset,
description->style.getTextLineHeight(evalContext),
letterSpacing,
description->style.getTextMaxWidth(evalContext),
description->style.getTextMaxAngle(evalContext),
labelRotationAlignment, textSymbolPlacement,
animationCoordinator, featureStateManager,
dpFactor);

instanceCounts.textCharacters = labelObject->getCharacterCount();

fontResult = nullptr;

if (fontResult) {
auto textOffset = description->style.getTextOffset(evalContext);
const auto textRadialOffset = description->style.getTextRadialOffset(evalContext);
const auto letterSpacing = description->style.getTextLetterSpacing(evalContext);

SymbolAlignment labelRotationAlignment = description->style.getTextRotationAlignment(evalContext);
boundingBoxRotationAlignment = labelRotationAlignment;
labelObject = std::make_shared<Tiled2dMapVectorSymbolLabelObject>(converter, featureContext, description, text, fullText,
coordinate, lineCoordinates, textAnchor, angle,
textJustify, fontResult, textOffset, textRadialOffset,
description->style.getTextLineHeight(evalContext),
letterSpacing,
description->style.getTextMaxWidth(evalContext),
description->style.getTextMaxAngle(evalContext),
labelRotationAlignment, textSymbolPlacement,
animationCoordinator, featureStateManager,
dpFactor);

instanceCounts.textCharacters = labelObject->getCharacterCount();
} else {
// font could not be loaded
std::string fontString;
for (const auto &font: fontList) {
fontString.append(font + ",");
}
fontString.pop_back();
ExceptionLogger::instance().logMessage("map-core:Tiled2dMapVectorSymbolObject", 0, "font (" + fontString + ") could not be loaded");
LogError << "font (" << fontString <<=") could not be loaded";
}
} else {
boundingBoxRotationAlignment = iconRotationAlignment;
}
Expand Down
Loading