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

[libGDX] 1.9.10 -> 1.11.0 #972

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ allprojects {
group = 'org.mapsforge'
version = 'master-SNAPSHOT'

ext.gdxVersion = "1.9.10"
ext.gdxVersion = "1.11.0"
ext.gwtVersion = "2.8.2"
ext.slf4jVersion = "1.7.28"

Expand All @@ -32,12 +32,12 @@ def versionName() { return version }

subprojects {
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
options.encoding = 'UTF-8'
if (JavaVersion.current().isJava9Compatible()) {
if (!project.properties.containsKey('android')) {
options.compilerArgs.addAll(['--release', '7'])
options.compilerArgs.addAll(['--release', '8'])
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public boolean setup() {
cam = new MapCamera(mMap);

renderContext =
new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));
new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.LRU, 1));

// shader = new DefaultShader(renderable.material,
// renderable.mesh.getVertexAttributes(), true, false, 1, 0, 0, 0);
Expand Down
2 changes: 1 addition & 1 deletion vtm-gdx-poi3d/src/org/oscim/gdx/poi3d/GdxRenderer3D.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public boolean setup() {
cam = new MapCamera(mMap);

renderContext =
new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.WEIGHTED, 1));
new RenderContext(new DefaultTextureBinder(DefaultTextureBinder.LRU, 1));

// shader = new DefaultShader(renderable.material,
// renderable.mesh.getVertexAttributes(), true, false, 1, 0, 0, 0);
Expand Down
5 changes: 3 additions & 2 deletions vtm-gdx/src/org/oscim/gdx/InputHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@ public boolean mouseMoved(int screenX, int screenY) {
}

@Override
public boolean scrolled(int amount) {
public boolean scrolled(float amountX, float amountY) {
float fx = mPosX - mMap.getWidth() / 2;
float fy = mPosY - mMap.getHeight() / 2;
mMap.animator().animateZoom(250, amount > 0 ? 0.75f : 1.333f, fx, fy, Easing.Type.LINEAR);
mMap.animator().animateZoom(250, amountY > 0 ? 0.75f : 1.333f, fx, fy, Easing.Type.LINEAR);
mMap.updateMap(false);
return true;
}
Expand All @@ -276,4 +276,5 @@ private boolean toggleBuildingLayer(List<Layer> layers) {
}
return false;
}

}
2 changes: 1 addition & 1 deletion vtm-gdx/src/org/oscim/gdx/MotionHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ public boolean mouseMoved(int screenX, int screenY) {
}

@Override
public boolean scrolled(int amount) {
public boolean scrolled(float amountX, float amountY) {
mTime = Gdx.input.getCurrentEventTime();

return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ public void onMapEvent(Event e, final MapPosition mapPosition) {
InputMultiplexer mux = new InputMultiplexer();
mux.addProcessor(new MotionHandler(map) {
@Override
public boolean scrolled(int amount) {
super.scrolled(amount);
public boolean scrolled(float amountX, float amountY) {
super.scrolled(amountX, amountY);
MapPosition mapPosition = map.getMapPosition();
int zoomLevel = mapPosition.getZoomLevel() - amount;
int zoomLevel = (int) (mapPosition.getZoomLevel() - amountY);
mapPosition.setZoomLevel(zoomLevel);
map.setMapPosition(mapPosition);
bothMapPositionHandler.mapPositionChangedFromVtmMap(mapPosition);
Expand Down