Skip to content

Commit

Permalink
Merge pull request #624 from openmobilemaps/release/2.2.0
Browse files Browse the repository at this point in the history
Release/2.2.0
  • Loading branch information
maurhofer-ubique authored Jun 11, 2024
2 parents 30a2ed8 + 3f7a55e commit ba0a088
Show file tree
Hide file tree
Showing 39 changed files with 453 additions and 242 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: android

on:
pull_request:
branches: [ main, develop ]
branches: [ main, develop, release/** ]

jobs:
build:
Expand All @@ -19,7 +19,7 @@ jobs:
java-version: 17
- name: Build with Gradle
env:
UBIQUE_ARTIFACTORY_URL: ${{secrets.UBIQUE_ARTIFACTORY_URL}}
UBIQUE_ARTIFACTORY_USER: ${{secrets.UBIQUE_ARTIFACTORY_USER}}
UBIQUE_ARTIFACTORY_PASS: ${{secrets.UBIQUE_ARTIFACTORY_PASS}}
UB_ARTIFACTORY_URL_ANDROID: ${{secrets.UBIQUE_ARTIFACTORY_URL}}
UB_ARTIFACTORY_USERNAME: ${{secrets.UBIQUE_ARTIFACTORY_USER}}
UB_ARTIFACTORY_PASSWORD: ${{secrets.UBIQUE_ARTIFACTORY_PASS}}
run: cd android; ./gradlew assembleDebug -P'android.injected.build.abi=arm64-v8a'
52 changes: 0 additions & 52 deletions .github/workflows/sonatype-develop.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/sonatype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
SIGNING_KEY_ARMOR: ${{secrets.MAVEN_SIGNING_KEY_ARMOR_BASE64}}
SIGNING_KEY_ID: ${{secrets.MAVEN_SIGNING_KEY_ID}}
SIGNING_KEY_PASSWORD: ${{secrets.MAVEN_SIGNING_KEY_PASSPHRASE}}
UBIQUE_ARTIFACTORY_URL: ${{secrets.UBIQUE_ARTIFACTORY_URL}}
UBIQUE_ARTIFACTORY_USER: ${{secrets.UBIQUE_ARTIFACTORY_USER}}
UBIQUE_ARTIFACTORY_PASS: ${{secrets.UBIQUE_ARTIFACTORY_PASS}}
UB_ARTIFACTORY_URL_ANDROID: ${{secrets.UBIQUE_ARTIFACTORY_URL}}
UB_ARTIFACTORY_USERNAME: ${{secrets.UBIQUE_ARTIFACTORY_USER}}
UB_ARTIFACTORY_PASSWORD: ${{secrets.UBIQUE_ARTIFACTORY_PASS}}
run: |
echo "Create .gpg key from secret"
echo $SIGNING_KEY_ARMOR | base64 --decode > ./signingkey.asc
Expand All @@ -51,9 +51,9 @@ jobs:
SIGNING_KEY_PASSWORD: ${{secrets.MAVEN_SIGNING_KEY_PASSPHRASE}}
SONATYPE_NEXUS_USERNAME: ${{secrets.SONATYPE_NEXUS_USERNAME}}
SONATYPE_NEXUS_PASSWORD: ${{secrets.SONATYPE_NEXUS_PASSWORD}}
UBIQUE_ARTIFACTORY_URL: ${{secrets.UBIQUE_ARTIFACTORY_URL}}
UBIQUE_ARTIFACTORY_USER: ${{secrets.UBIQUE_ARTIFACTORY_USER}}
UBIQUE_ARTIFACTORY_PASS: ${{secrets.UBIQUE_ARTIFACTORY_PASS}}
UB_ARTIFACTORY_URL_ANDROID: ${{secrets.UBIQUE_ARTIFACTORY_URL}}
UB_ARTIFACTORY_USERNAME: ${{secrets.UBIQUE_ARTIFACTORY_USER}}
UB_ARTIFACTORY_PASSWORD: ${{secrets.UBIQUE_ARTIFACTORY_PASS}}
run: |
cd android
echo "### Maven Dependency - Maven Central" >> $GITHUB_STEP_SUMMARY
Expand Down
79 changes: 50 additions & 29 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
# Changelog for Open Mobile Maps


## Version 2.2.0
- Adds support for `{bbox-epsg-3857}` placeholder in URL template
- Improves the handling of non-interactive polygon layers
- Improves performance logger
- Improves loading behavior of paused vector layer
- Pauses iOS MapView when in background
- Improves the stability of geojson parsing
- Fixes the interpolation for non-numeric values in vector layer styles
- Fixes a bug caused by an ill-timed vector layer reload
- Fixes issues with the zoom during moveToCenter animations

## Version 2.1.0 (08.04.2024)
- Adds dotted line style (line-dotted boolean and an optional skewFactor, defaulting to 1.0 and denoting the stretch factor)
- Fixes style for short dashes
- Fixes line touch area
- Fix map description issues in concurrent settings
- Added a Helper to create geojson strings from GeoJsonPoints

## Version 2.0.8 (04.06.2024)
- Add edge fill options for OpenGL textures
- iOS instanced rendering alpha multiplication fix

## Version 2.0.7 (29.04.2024)
- Adds performance logger (disabled by default)
- Fixes a bug in the android striped pattern shader
- Fixes a bug in geojson hole simplification

## Version 2.0.6 (10.04.2024)
- log exception when a font can not be loaded
- 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
- Call onRemoved on layerInterface before the mapScene is destroyed

## Version 2.0.4 (22.03.2024)
- Changes in symbol vector map collision detection: Run collision detection when zoom changes. This change ensures that icons never collide but also carries a performance burden.
Expand Down Expand Up @@ -55,35 +76,35 @@
- Convenience function for RectCoord to PolygonCoord conversion

## Version 1.5.0 (23.03.2023)
- implements vector icon anchor
- evaluate color from feature context
- expose bounding box in djinni
- fixes touch propagation in VectorLayer
- iOS: fixes graphics object race conditions
- fixes vector tile origin
- adds option to enable/disable underzoom and overzoom
- adds exception logger
- adds network activity manager
- adds two finger zoom out gesture
- adds option to specify multiple loaders
- many improvements and bugfixes
- Implements vector icon anchor
- Evaluate color from feature context
- Expose bounding box in djinni
- Fixes touch propagation in VectorLayer
- iOS: fixes graphics object race conditions
- Fixes vector tile origin
- Adds option to enable/disable underzoom and overzoom
- Adds exception logger
- Adds network activity manager
- Adds two finger zoom out gesture
- Adds option to specify multiple loaders
- Many improvements and bugfixes

## Version 1.4.1 (16.08.2022)
- iOS: updates device to ppi mapping
- iOS: fixes masked line groups
- iOS: fixes bug that caused the map to be cropped if display zoom is enabled
- iOS: fixes metal crash when attempting to load empty texture
- fixes a error in MapCamera2d::getPaddingCorrectedBounds
- Fixes a error in MapCamera2d::getPaddingCorrectedBounds

## Version 1.4.0 (09.06.2022)
- includes earcut.hpp dependency for polygon triangulation
- adds polygon and line group rendering objects which can be used to efficiently render many objects with a limited number of styles
- expands line style options
- adds masking methods to the layerInterface
- adds scissoring methods to the layerInterface
- adds option to display tiled raster layer density dependent
- adds off screen rendering helpers
- many improvements and bugfixes
- Adds polygon and line group rendering objects which can be used to efficiently render many objects with a limited number of styles
- Expands line style options
- Adds masking methods to the layerInterface
- Adds scissoring methods to the layerInterface
- Adds option to display tiled raster layer density dependent
- Adds off screen rendering helpers
- Many improvements and bugfixes

## Version 1.3.3 (16.08.2021)
- Memory leak fix for Android
Expand All @@ -97,21 +118,21 @@
- Add line layer implementation

## Version 1.3.0 (19.04.2021)
- fixes iOS retain cycle
- Fixes iOS retain cycle
- Native library and relevant header files are now properly included in the published dependency
- Added a Circle2dLayerObject
- bugfixes & improvements
- Bugfixes & improvements

## Version 1.2.0 (03.03.2021)

- Add WMTS capability parsing capabilities
- Add icon layer implementation
- implemented camera movement inertia
- improves animation handling
- bugfixes and improvements
- Implemented camera movement inertia
- Improves animation handling
- Bugfixes and improvements

## Version 1.1.0 (01.03.2021)
- various improvements & bugfixes
- Various improvements & bugfixes

## Version 1.0.0 (19.02.2021)
- initial version of open mobile maps
- Initial version of open mobile maps
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ publishing {
repositories {
maven {
name = "UbiqueMaven"
url = System.getenv('UBIQUE_ARTIFACTORY_URL') ?: readPropertyWithDefault('ubiqueArtifactoryUrl', '')
url = System.getenv('UB_ARTIFACTORY_URL_ANDROID') ?: readPropertyWithDefault('ubiqueMavenUrl', '')
credentials {
username = System.getenv('UBIQUE_ARTIFACTORY_USER') ?: readPropertyWithDefault('ubiqueArtifactoryUser', '')
password = System.getenv('UBIQUE_ARTIFACTORY_PASS') ?: readPropertyWithDefault('ubiqueArtifactoryPass', '')
username = System.getenv('UB_ARTIFACTORY_USERNAME') ?: readPropertyWithDefault('ubiqueMavenUser', '')
password = System.getenv('UB_ARTIFACTORY_PASSWORD') ?: readPropertyWithDefault('ubiqueMavenPass', '')
}
}
}
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.1.0
VERSION_CODE=2010000
VERSION_NAME=2.2.0
VERSION_CODE=2020000

POM_NAME=mapscore
POM_PACKAGING=aar
Expand Down
2 changes: 1 addition & 1 deletion android/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This library is available on MavenCentral. To add it to your Android project, ad

```
dependencies {
implementation 'io.openmobilemaps:mapscore:2.1.0'
implementation 'io.openmobilemaps:mapscore:2.2.0'
}
```

Expand Down
4 changes: 2 additions & 2 deletions android/src/main/cpp/graphics/OpenGlContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ void OpenGlContext::setBackgroundColor(const Color &color) { backgroundColor = c

void OpenGlContext::setupDrawFrame() {
glClearColor(backgroundColor.r, backgroundColor.g, backgroundColor.b, backgroundColor.a);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
glClearStencil(0);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}

void OpenGlContext::preRenderStencilMask() {
glEnable(GL_STENCIL_TEST);
glClear(GL_STENCIL_BUFFER_BIT);
glClearStencil(0);
glClear(GL_STENCIL_BUFFER_BIT);
glStencilFunc(GL_ALWAYS, 128, 1);
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ int BaseShaderProgramOpenGl::loadShader(int type, std::string shaderCode) {
std::vector<GLchar> errorLog(maxLength);
glGetShaderInfoLog(shader, maxLength, &maxLength, &errorLog[0]);

LogError << "Shader " << shader << " failed:\n";
std::stringstream errorSS;
errorSS << "Shader " << shader << " (" << getProgramName() << ") failed:\n";

for (auto a : errorLog) {
LogError << a;
errorSS << a;
}

LogError <<= ".";
LogError << errorSS.str() <<= ".";
}
return shader;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ std::string ColorPolygonGroup2dShaderOpenGl::getVertexShader() {
} else if (styleIndex > numStyles) {
styleIndex = numStyles;
}
styleIndex = styleIndex * 5;
styleIndex = styleIndex * 7;
color = vec4(polygonStyles[styleIndex], polygonStyles[styleIndex + 1],
polygonStyles[styleIndex + 2], polygonStyles[styleIndex + 3] * polygonStyles[styleIndex + 4]);
stripeInfo = vec2(polygonStyles[styleIndex + 5], polygonStyles[styleIndex + 6]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,20 @@ package io.openmobilemaps.mapscore.graphics

import android.graphics.Bitmap
import android.graphics.Canvas
import android.graphics.Rect
import android.graphics.drawable.Drawable
import android.opengl.GLES20
import android.opengl.GLUtils
import io.openmobilemaps.mapscore.shared.graphics.objects.TextureHolderInterface
import java.nio.IntBuffer
import java.util.concurrent.locks.ReentrantLock
import kotlin.math.min

class BitmapTextureHolder(
bitmap: Bitmap,
private val minFilter: Int = GLES20.GL_LINEAR,
private val magFilter: Int = GLES20.GL_LINEAR,
edgeFillMode: CanvasEdgeFillMode = CanvasEdgeFillMode.Mirorred
) : TextureHolderInterface() {

val bitmap: Bitmap
Expand Down Expand Up @@ -136,16 +139,46 @@ class BitmapTextureHolder(
c.drawBitmap(bitmap, 0f, 0f, null)

//Draw the picture mirrored again to fake clamp mode
c.save()
c.scale(1f, -1f, 0f, bitmap.height.toFloat())
c.drawBitmap(bitmap, 0f, 0f, null)
c.restore()
c.save()
c.scale(-1f, 1f, bitmap.width.toFloat(), 0f)
c.drawBitmap(bitmap, 0f, 0f, null)
c.restore()
c.scale(-1f, -1f, bitmap.width.toFloat(), bitmap.height.toFloat())
c.drawBitmap(bitmap, 0f, 0f, null)
when (edgeFillMode) {
is CanvasEdgeFillMode.Clamped -> {
c.drawBitmap(
bitmap,
Rect(0, bitmap.height - 1, bitmap.width, bitmap.height),
Rect(0, bitmap.height, bitmap.width, min(height, bitmap.height + edgeFillMode.borderWidthPx)),
null
)
c.drawBitmap(
bitmap,
Rect(bitmap.width - 1, 0, bitmap.width, bitmap.height),
Rect(bitmap.width, 0, min(width, bitmap.width + edgeFillMode.borderWidthPx), bitmap.height),
null
)
c.drawBitmap(
bitmap,
Rect(bitmap.width - 1, bitmap.height - 1, bitmap.width, bitmap.height),
Rect(
bitmap.width,
bitmap.height,
min(width, bitmap.width + edgeFillMode.borderWidthPx),
min(height, bitmap.height + edgeFillMode.borderWidthPx)
),
null
)
}
CanvasEdgeFillMode.Mirorred -> {
c.save()
c.scale(1f, -1f, 0f, bitmap.height.toFloat())
c.drawBitmap(bitmap, 0f, 0f, null)
c.restore()
c.save()
c.scale(-1f, 1f, bitmap.width.toFloat(), 0f)
c.drawBitmap(bitmap, 0f, 0f, null)
c.restore()
c.scale(-1f, -1f, bitmap.width.toFloat(), bitmap.height.toFloat())
c.drawBitmap(bitmap, 0f, 0f, null)
}
CanvasEdgeFillMode.None -> {}
}
bitmap.recycle()
bitmap = large
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package io.openmobilemaps.mapscore.graphics

sealed class CanvasEdgeFillMode {
data object Mirorred : CanvasEdgeFillMode()
data class Clamped(val borderWidthPx: Int) : CanvasEdgeFillMode()
data object None : CanvasEdgeFillMode()
}
Loading

0 comments on commit ba0a088

Please sign in to comment.