diff --git a/docs/Changelog.md b/docs/Changelog.md index c6e14f56..5d77fa4e 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -12,6 +12,10 @@ - vtm-models module [#580](https://github.com/mapsforge/vtm/issues/580) - ViewController refactor [#625](https://github.com/mapsforge/vtm/pull/625) - `getMapViewCenter`, `setMapViewCenter` with pivotX, pivotY +- Enable optimal placement of labels or symbols on polygons + - `Parameters.POLY_LABEL` +- Enable placement of symbols on polygons + - `Parameters.POLY_SYMBOL` - OpenGL ES 3.0 support [#646](https://github.com/mapsforge/vtm/issues/646) - OpenGL ES 2.0 complete [#642](https://github.com/mapsforge/vtm/pull/642) - libGDX 1.9.9 [#635](https://github.com/mapsforge/vtm/issues/635) diff --git a/vtm-android-example/AndroidManifest.xml b/vtm-android-example/AndroidManifest.xml index dfdbd783..5eecc672 100644 --- a/vtm-android-example/AndroidManifest.xml +++ b/vtm-android-example/AndroidManifest.xml @@ -79,9 +79,6 @@ - diff --git a/vtm-android-example/src/org/oscim/android/test/MapsforgePolyLabelActivity.java b/vtm-android-example/src/org/oscim/android/test/MapsforgePolyLabelActivity.java deleted file mode 100644 index 120e56d8..00000000 --- a/vtm-android-example/src/org/oscim/android/test/MapsforgePolyLabelActivity.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2017-2018 devemux86 - * - * This program is free software: you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along with - * this program. If not, see . - */ -package org.oscim.android.test; - -import android.os.Bundle; - -import org.oscim.utils.Parameters; - -public class MapsforgePolyLabelActivity extends MapsforgeActivity { - - @Override - protected void onCreate(Bundle savedInstanceState) { - Parameters.POLY_LABEL = true; - - super.onCreate(savedInstanceState); - } - - @Override - protected void onDestroy() { - super.onDestroy(); - - Parameters.POLY_LABEL = false; - } -} diff --git a/vtm-android-example/src/org/oscim/android/test/Samples.java b/vtm-android-example/src/org/oscim/android/test/Samples.java index b6bdfa08..f19efe53 100644 --- a/vtm-android-example/src/org/oscim/android/test/Samples.java +++ b/vtm-android-example/src/org/oscim/android/test/Samples.java @@ -1,7 +1,7 @@ /* * Copyright 2010, 2011, 2012, 2013 mapsforge.org * Copyright 2013 Hannes Janetzek - * Copyright 2016-2018 devemux86 + * Copyright 2016-2019 devemux86 * Copyright 2016 mar-v-in * Copyright 2016 Mathieu de Brito * Copyright 2017-2018 Longri @@ -108,7 +108,6 @@ public class Samples extends Activity { linearLayout.addView(createLabel("Vector Features")); linearLayout.addView(createButton(MapsforgeStyleActivity.class)); - linearLayout.addView(createButton(MapsforgePolyLabelActivity.class)); linearLayout.addView(createButton(MapsforgeS3DBActivity.class)); linearLayout.addView(createButton(AtlasThemeActivity.class)); linearLayout.addView(createButton(POTTextureActivity.class)); diff --git a/vtm-playground/src/org/oscim/test/MapsforgePolyLabelTest.java b/vtm-playground/src/org/oscim/test/MapsforgePolyLabelTest.java deleted file mode 100644 index 254b0a05..00000000 --- a/vtm-playground/src/org/oscim/test/MapsforgePolyLabelTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2017 devemux86 - * - * This program is free software: you can redistribute it and/or modify it under the - * terms of the GNU Lesser General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A - * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along with - * this program. If not, see . - */ -package org.oscim.test; - -import org.oscim.gdx.GdxMapApp; -import org.oscim.utils.Parameters; - -import java.io.File; - -public class MapsforgePolyLabelTest extends MapsforgeTest { - - private MapsforgePolyLabelTest(File mapFile) { - super(mapFile); - - Parameters.POLY_LABEL = true; - } - - public static void main(String[] args) { - GdxMapApp.init(); - GdxMapApp.run(new MapsforgePolyLabelTest(getMapFile(args))); - } -} diff --git a/vtm/src/org/oscim/utils/Parameters.java b/vtm/src/org/oscim/utils/Parameters.java index 099566a0..b95353a5 100644 --- a/vtm/src/org/oscim/utils/Parameters.java +++ b/vtm/src/org/oscim/utils/Parameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 devemux86 + * Copyright 2017-2019 devemux86 * * This program is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software @@ -44,12 +44,12 @@ public final class Parameters { /** * Optimal placement of labels or symbols on polygons. */ - public static boolean POLY_LABEL = false; + public static boolean POLY_LABEL = true; /** * Placement of symbols on polygons. */ - public static boolean POLY_SYMBOL = false; + public static boolean POLY_SYMBOL = true; /** * POT textures in themes.