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.2.0 #624

Merged
merged 37 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
cfea871
Add support for EPSG:3857 url template
maerki Apr 9, 2024
fb76dd1
Update Changelog
maerki Apr 9, 2024
103e6b4
removes precondition
stmitt Apr 10, 2024
adf8dba
only capture touches in polygon when callbackhandler is set
stmitt Apr 10, 2024
add089d
Merge branch 'release/2.2.0' into feature/epsg-url-template
maerki Apr 12, 2024
12e1eba
Merge pull request #622 from openmobilemaps/feature/epsg-url-template
maerki Apr 12, 2024
5794973
remove duplicate code in GeoJSONVT
stmitt Apr 20, 2024
06ce189
fixes a bug in hole simplificaten
stmitt Apr 20, 2024
5a1bc32
adds PerformanceLogger
stmitt Apr 24, 2024
c1be812
fixes performance logger build
stmitt Apr 25, 2024
7b7de21
Add option for periodic finish in GLThread
maurhofer-ubique Apr 25, 2024
7528817
reuse gpu buffer on iOS if possible
stmitt Apr 25, 2024
799fde5
Add overridable onMapViewStateUpdated method in the MapView
maurhofer-ubique Apr 26, 2024
98ddab3
Fix value offset for polygon in striped case
maurhofer-ubique Apr 29, 2024
85ba90a
increase version to 2.0.7
stmitt Apr 29, 2024
2004a14
Merge remote-tracking branch 'origin/release/2.0.7' into release/2.2.0
stmitt Apr 29, 2024
8687b0d
improve performance logger
stmitt Apr 30, 2024
9141281
fixes iOS alpha instances pre multiplication
stmitt Apr 30, 2024
5393cb9
fixes logger types
stmitt May 2, 2024
cc6ae5a
cancel post loading if not visible anymore
stmitt May 2, 2024
6e44b28
pause mapview when app is in background
stmitt May 2, 2024
45a90e3
make geojson parser more stable
stmitt May 2, 2024
ffa2c49
Merge remote-tracking branch 'origin/release/2.0.7' into release/2.2.0
stmitt May 6, 2024
85c1533
print error instead of crashing when parsing a unsupported stop expre…
stmitt May 7, 2024
0f23d1e
fixes interpolation for non numeric values
stmitt May 7, 2024
4c947d1
Add BitmapTextureHolder canvas expansion POT modes, stencil clear order
maurhofer-ubique May 29, 2024
8fb48df
Improve shader compilation error logging for OpenGl
maurhofer-ubique May 31, 2024
96d37bf
Fix segfault on improperly timed reload call
maurhofer-ubique May 31, 2024
f5ffa92
Don’t call setZoom during moveToCenter(animated)
maerki Jun 1, 2024
ce9b45c
Merge pull request #629 from openmobilemaps/bugfix/animated-move-to-p…
maerki Jun 3, 2024
e16da4d
Revert "fixes iOS alpha instances pre multiplication"
stmitt Jun 3, 2024
1c9d34f
Prepare for release 2.0.8
maurhofer-ubique Jun 4, 2024
4c3db1a
Build on release/-PRs, adjust credential names to match usual pattern
maurhofer-ubique Jun 5, 2024
cf3d187
Merge pull request #630 from openmobilemaps/feature/artifactory-secrets
maurhofer-ubique Jun 5, 2024
efb05d6
Merge remote-tracking branch 'origin/release/2.2.0' into feature/prep…
maurhofer-ubique Jun 6, 2024
4ea9490
Merge pull request #631 from openmobilemaps/feature/prepare-2.0.8-merge
stmitt Jun 6, 2024
3f7a55e
Prepare for 2.2.0 release
maurhofer-ubique Jun 11, 2024
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
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}}
Comment on lines +22 to +24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

The old environment variables (UB_ARTIFACTORY_URL, UB_ARTIFACTORY_USERNAME, UB_ARTIFACTORY_PASSWORD) are still present in the android/build.gradle file. These should be updated to the new environment variables to ensure consistency across the codebase.

  • android/build.gradle:
    • UB_ARTIFACTORY_URL should be updated to UBIQUE_ARTIFACTORY_URL
    • UB_ARTIFACTORY_USERNAME should be updated to UBIQUE_ARTIFACTORY_USER
    • UB_ARTIFACTORY_PASSWORD should be updated to UBIQUE_ARTIFACTORY_PASS
Analysis chain

Ensure that the renamed environment variables are consistently used across all configuration files.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the consistent use of renamed environment variables across all configuration files.

# Test: Search for the old and new environment variable names. Expect: Only occurrences of the new names.
rg --type all $'UBIQUE_ARTIFACTORY_URL|UBIQUE_ARTIFACTORY_USER|UBIQUE_ARTIFACTORY_PASS'

Length of output: 88



Script:

#!/bin/bash
# Description: Verify the consistent use of renamed environment variables across all configuration files.

# Test: Search for the old and new environment variable names. Expect: Only occurrences of the new names.
rg --type all $'UBIQUE_ARTIFACTORY_URL|UBIQUE_ARTIFACTORY_USER|UBIQUE_ARTIFACTORY_PASS|UB_ARTIFACTORY_URL|UB_ARTIFACTORY_USERNAME|UB_ARTIFACTORY_PASSWORD'

Length of output: 532

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
Loading