diff --git a/README.md b/README.md index 7e1f4b2..2ffb918 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Currently OPFMaps supports the following maps: [Google Maps][google-maps], [Amaz The main dependencies are the `opfmaps` module and the [OPFUtils][opfutils] library: ```gradle -compile 'org.onepf:opfmaps:0.1.1@aar' +compile 'com.github.siekierskip.OPFMaps:opfmaps:v0.1.6' compile 'org.onepf:opfutils:0.1.26' ``` Then you have to add at least one map provider dependency. @@ -21,8 +21,8 @@ Then you have to add at least one map provider dependency. *Google Maps Provider*: ```gradle -compile 'org.onepf:opfmaps-google:0.1.1@aar' -compile 'com.google.android.gms:play-services-maps:8.1.0' +compile 'com.github.siekierskip.OPFMaps:google:v0.1.6' +compile 'com.google.android.gms:play-services-maps:10.0.1' ``` *NOTE:* Also for Google Maps you must add [Maps API Key][google-api-key] to the AndroidManifest.xml file. @@ -30,16 +30,16 @@ compile 'com.google.android.gms:play-services-maps:8.1.0' *Amazon Maps Provider*: ```gradle -compile 'org.onepf:opfmaps-amazon:0.1.1@aar' +compile 'com.github.siekierskip.OPFMaps:amazon:v0.1.6' compile 'com.amazon:amazon-maps-api:2.0' ``` *Osmdroid Provider*: ```gradle -compile 'org.onepf:opfmaps-osmdroid:0.1.1@aar' -compile 'org.osmdroid:osmdroid-android:4.3' -compile 'org.osmdroid:bonuspack:5.3' +compile 'com.github.siekierskip.OPFMaps:osmdroid:v0.1.6' +compile 'org.osmdroid:osmdroid-android:5.6.4' +compile 'com.github.MKergall:osmbonuspack:6.3' compile 'org.slf4j:slf4j-android:1.7.12' compile 'org.apache.commons:commons-lang3:3.4' compile 'com.google.code.gson:gson:2.3.1' @@ -53,6 +53,7 @@ allprojects { ... // third-party dependencies maven { url 'https://raw.githubusercontent.com/onepf/OPF-mvn-repo/master/' } + maven { url "https://jitpack.io" } } } ``` @@ -60,7 +61,7 @@ allprojects { *Yandex Maps Provider*: ```gradle -compile 'org.onepf:opfmaps-yandex-web:0.1.1@aar' +compile 'com.github.siekierskip.OPFMaps:yandex:v0.1.6' ``` diff --git a/build.gradle b/build.gradle index 4d0b589..c6710bc 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,7 @@ task wrapper(type: Wrapper) { buildscript { repositories { jcenter() + mavenCentral() } dependencies { @@ -28,6 +29,8 @@ buildscript { classpath 'com.android.tools.build:gradle:1.3.0' classpath 'com.noveogroup.android:check:1.1.2' classpath 'net.ltgt.gradle:gradle-errorprone-plugin:latest.release' + classpath 'com.github.dcendents:android-maven-plugin:1.2' + } } @@ -36,6 +39,8 @@ allprojects { repositories { jcenter() + maven { url 'https://jitpack.io' } + } ext { diff --git a/gradle.properties b/gradle.properties index e706e54..6a63086 100644 --- a/gradle.properties +++ b/gradle.properties @@ -34,15 +34,15 @@ # org.gradle.parallel=true GROUP = org.onepf -POM_URL = https://github.com/onepf/OPFMaps -POM_SCM_URL = https://github.com/onepf/OPFMaps -POM_SCM_CONNECTION = scm:git@github.com:onepf/OPFMaps.git -POM_SCM_DEV_CONNECTION = scm:git@github.com:onepf/OPFMaps.git +POM_URL = https://github.com/siekierskip/OPFMaps +POM_SCM_URL = https://github.com/siekierskip/OPFMaps +POM_SCM_CONNECTION = scm:git@github.com:siekierskip/OPFMaps.git +POM_SCM_DEV_CONNECTION = scm:git@github.com:siekierskip/OPFMaps.git POM_LICENCE_NAME = The Apache Software License, Version 2.0 POM_LICENCE_URL = http://www.apache.org/licenses/LICENSE-2.0.txt POM_LICENCE_DIST = repo -POM_DEVELOPER_ID = onepf -POM_DEVELOPER_NAME = One Platform Foundation +POM_DEVELOPER_ID = siekierskip +POM_DEVELOPER_NAME = Asseco Data Systems POM_PACKAGING = aar SNAPSHOT_REPOSITORY_URL = https://oss.sonatype.org/content/repositories/snapshots/ diff --git a/opfmaps-providers/amazon/build.gradle b/opfmaps-providers/amazon/build.gradle index 43c62ca..1702611 100644 --- a/opfmaps-providers/amazon/build.gradle +++ b/opfmaps-providers/amazon/build.gradle @@ -23,11 +23,16 @@ android { targetSdkVersion 23 versionName "0.1.1" } + + lintOptions { + abortOnError false + } } dependencies { - compile 'org.onepf:opfmaps:0.1.1@aar' + provided 'com.github.siekierskip.OPFMaps:opfmaps:v0.1.5' provided 'org.onepf:opfutils:0.1.26' + compile 'com.amazon:amazon-maps-api:2.0' provided 'com.android.support:support-annotations:23.1.0' } diff --git a/opfmaps-providers/google/build.gradle b/opfmaps-providers/google/build.gradle index bd640a7..167fc9a 100644 --- a/opfmaps-providers/google/build.gradle +++ b/opfmaps-providers/google/build.gradle @@ -21,13 +21,14 @@ android { defaultConfig { minSdkVersion 15 targetSdkVersion 23 - versionName "0.1.1" + versionName "0.1.6" } } dependencies { - compile 'org.onepf:opfmaps:0.1.1@aar' + provided 'com.github.siekierskip.OPFMaps:opfmaps:v0.1.5' provided 'org.onepf:opfutils:0.1.26' - compile 'com.google.android.gms:play-services-maps:8.1.0' + + compile 'com.google.android.gms:play-services-maps:10.0.1' provided 'com.android.support:support-annotations:23.1.0' } diff --git a/opfmaps-providers/google/gradle.properties b/opfmaps-providers/google/gradle.properties index 61a81ff..e1cbb87 100644 --- a/opfmaps-providers/google/gradle.properties +++ b/opfmaps-providers/google/gradle.properties @@ -18,6 +18,6 @@ POM_NAME = Google Map Provider POM_ARTIFACT_ID = opfmaps-google POM_DESCRIPTION = Google Map provider implementation for OPFMaps library POM_PACKAGING = aar -POM_SCM_URL = https://github.com/onepf/OPFMaps.git -POM_SCM_CONNECTION = scm:git@github.com:onepf/OPFMaps.git -POM_SCM_DEV_CONNECTION = scm:git@github.com:onepf/OPFMaps.git +POM_SCM_URL = https://github.com/siekierskip/OPFMaps.git +POM_SCM_CONNECTION = scm:git@github.com:siekierskip/OPFMaps.git +POM_SCM_DEV_CONNECTION = scm:git@github.com:siekierskip/OPFMaps.git diff --git a/opfmaps-providers/osmdroid/build.gradle b/opfmaps-providers/osmdroid/build.gradle index c9fe9b2..cfd9cc9 100644 --- a/opfmaps-providers/osmdroid/build.gradle +++ b/opfmaps-providers/osmdroid/build.gradle @@ -21,24 +21,24 @@ android { defaultConfig { minSdkVersion 15 targetSdkVersion 23 - versionName "0.1.1" + versionName "0.1.6" } +} - lintOptions { - abortOnError true - checkAllWarnings true - warningsAsErrors true - disable 'IconDensities' +repositories { + mavenCentral() + maven { url "https://jitpack.io" } + flatDir { + dirs 'libs' } } dependencies { - compile 'org.onepf:opfmaps:0.1.1@aar' + provided 'com.github.siekierskip.OPFMaps:opfmaps:v0.1.5' provided 'org.onepf:opfutils:0.1.26' - compile 'org.osmdroid:bonuspack:5.3' - //noinspection NewerVersionAvailable - compile 'org.osmdroid:osmdroid-android:4.3' + compile 'org.osmdroid:osmdroid-android:5.6.4' + compile 'com.github.MKergall:osmbonuspack:6.3' //noinspection NewerVersionAvailable compile 'org.slf4j:slf4j-android:1.7.12' diff --git a/opfmaps-providers/osmdroid/gradle.properties b/opfmaps-providers/osmdroid/gradle.properties index 409fb2d..46bb307 100644 --- a/opfmaps-providers/osmdroid/gradle.properties +++ b/opfmaps-providers/osmdroid/gradle.properties @@ -18,6 +18,6 @@ POM_NAME = Osmdroid Map Provider POM_ARTIFACT_ID = opfmaps-osmdroid POM_DESCRIPTION = Osmdroid Map provider implementation for OPFMaps library POM_PACKAGING = aar -POM_SCM_URL = https://github.com/onepf/OPFMaps.git -POM_SCM_CONNECTION = scm:git@github.com:onepf/OPFMaps.git -POM_SCM_DEV_CONNECTION = scm:git@github.com:onepf/OPFMaps.git \ No newline at end of file +POM_SCM_URL = https://github.com/siekierskip/OPFMaps.git +POM_SCM_CONNECTION = scm:git@github.com:siekierskip/OPFMaps.git +POM_SCM_DEV_CONNECTION = scm:git@github.com:siekierskip/OPFMaps.git \ No newline at end of file diff --git a/opfmaps-providers/osmdroid/proguard-rules.pro b/opfmaps-providers/osmdroid/proguard-rules.pro index 6c45066..30d297b 100644 --- a/opfmaps-providers/osmdroid/proguard-rules.pro +++ b/opfmaps-providers/osmdroid/proguard-rules.pro @@ -15,3 +15,4 @@ #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} +-dontwarn okio.** \ No newline at end of file diff --git a/opfmaps-providers/osmdroid/src/main/AndroidManifest.xml b/opfmaps-providers/osmdroid/src/main/AndroidManifest.xml index 30cbbbe..83baef2 100644 --- a/opfmaps-providers/osmdroid/src/main/AndroidManifest.xml +++ b/opfmaps-providers/osmdroid/src/main/AndroidManifest.xml @@ -14,9 +14,15 @@ ~ limitations under the License. --> - + + + + + + diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/OsmdroidDelegatesFactory.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/OsmdroidDelegatesFactory.java index ecc0eaa..4b09c59 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/OsmdroidDelegatesFactory.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/OsmdroidDelegatesFactory.java @@ -58,7 +58,7 @@ import org.onepf.opfmaps.model.OPFLatLng; import org.onepf.opfmaps.model.OPFLatLngBounds; import org.onepf.opfmaps.model.OPFUrlTileProvider.TileUrlProvider; -import org.osmdroid.util.BoundingBoxE6; +import org.osmdroid.util.BoundingBox; import org.osmdroid.util.GeoPoint; /** @@ -102,7 +102,7 @@ public LatLngDelegate createLatLngDelegate(final double latitude, final double l @Override public LatLngBoundsDelegate createLatLngBoundsDelegate(@NonNull final OPFLatLng southwest, @NonNull final OPFLatLng northeast) { - return new OsmdroidLatLngBoundsDelegate(new BoundingBoxE6( + return new OsmdroidLatLngBoundsDelegate(new BoundingBox( northeast.getLat(), northeast.getLng(), southwest.getLat(), diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/OsmdroidMapProvider.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/OsmdroidMapProvider.java index 6843b74..b1407e3 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/OsmdroidMapProvider.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/OsmdroidMapProvider.java @@ -147,9 +147,13 @@ private static Map createDefaultTileSourceMap() { final Map tileSourceMap = new HashMap<>(); tileSourceMap.put(OPFMapType.NONE, TileSourceFactory.MAPNIK); tileSourceMap.put(OPFMapType.NORMAL, TileSourceFactory.MAPNIK); - tileSourceMap.put(OPFMapType.SATELLITE, TileSourceFactory.MAPQUESTAERIAL); + tileSourceMap.put(OPFMapType.SATELLITE, TileSourceFactory.MAPNIK); + tileSourceMap.put(OPFMapType.TERRAIN, TileSourceFactory.MAPNIK); + tileSourceMap.put(OPFMapType.HYBRID, TileSourceFactory.MAPNIK); + + /*tileSourceMap.put(OPFMapType.SATELLITE, TileSourceFactory.MAPQUESTAERIAL); tileSourceMap.put(OPFMapType.TERRAIN, TileSourceFactory.MAPQUESTOSM); - tileSourceMap.put(OPFMapType.HYBRID, TileSourceFactory.MAPQUESTOSM); + tileSourceMap.put(OPFMapType.HYBRID, TileSourceFactory.MAPQUESTOSM);*/ return tileSourceMap; } } diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/OsmdroidMapDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/OsmdroidMapDelegate.java index 2e7b2fd..7893393 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/OsmdroidMapDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/OsmdroidMapDelegate.java @@ -72,13 +72,13 @@ import org.osmdroid.api.IGeoPoint; import org.osmdroid.api.IMapController; import org.osmdroid.bonuspack.overlays.GroundOverlay; -import org.osmdroid.bonuspack.overlays.InfoWindow; -import org.osmdroid.bonuspack.overlays.Marker; -import org.osmdroid.bonuspack.overlays.Polygon; -import org.osmdroid.bonuspack.overlays.Polyline; import org.osmdroid.views.MapView; import org.osmdroid.views.Projection; +import org.osmdroid.views.overlay.Marker; import org.osmdroid.views.overlay.Overlay; +import org.osmdroid.views.overlay.Polygon; +import org.osmdroid.views.overlay.Polyline; +import org.osmdroid.views.overlay.infowindow.InfoWindow; import java.util.Iterator; import java.util.List; diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/OsmdroidMapViewDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/OsmdroidMapViewDelegate.java index d3a2c9a..4335c48 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/OsmdroidMapViewDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/OsmdroidMapViewDelegate.java @@ -103,7 +103,8 @@ public OsmdroidMapViewDelegate(final Context context) { } public OsmdroidMapViewDelegate(final Context context, @Nullable final OsmdroidMapOptions options) { - super(context, context.getResources().getInteger(R.integer.default_tile_size_pixels)); +// super(context, context.getResources().getInteger(R.integer.default_tile_size_pixels)); + super(context); this.options = options; } diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidCameraUpdateFactoryDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidCameraUpdateFactoryDelegate.java index 22890a1..dd89bbe 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidCameraUpdateFactoryDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidCameraUpdateFactoryDelegate.java @@ -26,7 +26,7 @@ import org.onepf.opfmaps.model.OPFCameraUpdate; import org.onepf.opfmaps.model.OPFLatLng; import org.onepf.opfmaps.model.OPFLatLngBounds; -import org.osmdroid.util.BoundingBoxE6; +import org.osmdroid.util.BoundingBox; import org.osmdroid.util.GeoPoint; /** @@ -60,7 +60,7 @@ public OPFCameraUpdate newLatLng(@NonNull final OPFLatLng latLng) { @Override public OPFCameraUpdate newLatLngBounds(@NonNull final OPFLatLngBounds bounds, final int padding) { return new OPFCameraUpdate(new OsmdroidCameraUpdateDelegate(CameraUpdateFactory.newLatLngBounds( - new BoundingBoxE6( + new BoundingBox( bounds.getNortheast().getLat(), bounds.getNortheast().getLng(), bounds.getSouthwest().getLat(), @@ -77,7 +77,7 @@ public OPFCameraUpdate newLatLngBounds(@NonNull final OPFLatLngBounds bounds, final int height, final int padding) { return new OPFCameraUpdate(new OsmdroidCameraUpdateDelegate(CameraUpdateFactory.newLatLngBounds( - new BoundingBoxE6( + new BoundingBox( bounds.getNortheast().getLat(), bounds.getNortheast().getLng(), bounds.getSouthwest().getLat(), diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidCircleDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidCircleDelegate.java index 18adca2..2d33e42 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidCircleDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidCircleDelegate.java @@ -22,9 +22,9 @@ import org.onepf.opfmaps.delegate.model.CircleDelegate; import org.onepf.opfmaps.model.OPFLatLng; import org.onepf.opfutils.OPFLog; -import org.osmdroid.bonuspack.overlays.Polygon; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapView; +import org.osmdroid.views.overlay.Polygon; /** * @author Roman Savin diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidGroundOverlayOptionsDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidGroundOverlayOptionsDelegate.java index 1a17fee..f98cf85 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidGroundOverlayOptionsDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidGroundOverlayOptionsDelegate.java @@ -26,7 +26,7 @@ import org.onepf.opfmaps.model.OPFBitmapDescriptor; import org.onepf.opfmaps.model.OPFLatLng; import org.onepf.opfmaps.model.OPFLatLngBounds; -import org.osmdroid.util.BoundingBoxE6; +import org.osmdroid.util.BoundingBox; import org.osmdroid.util.GeoPoint; /** @@ -90,7 +90,7 @@ public float getBearing() { @Nullable @Override public OPFLatLngBounds getBounds() { - final BoundingBoxE6 bounds = groundOverlayOptions.getBounds(); + final BoundingBox bounds = groundOverlayOptions.getBounds(); if (bounds != null) { return new OPFLatLngBounds(new OsmdroidLatLngBoundsDelegate(bounds)); } @@ -168,7 +168,7 @@ public OsmdroidGroundOverlayOptionsDelegate position(@NonNull final OPFLatLng lo @NonNull @Override public OsmdroidGroundOverlayOptionsDelegate positionFromBounds(@NonNull final OPFLatLngBounds bounds) { - groundOverlayOptions.positionFromBounds(new BoundingBoxE6( + groundOverlayOptions.positionFromBounds(new BoundingBox( bounds.getNortheast().getLat(), bounds.getNortheast().getLng(), bounds.getSouthwest().getLat(), diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidLatLngBoundsDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidLatLngBoundsDelegate.java index 70352e1..c02db1a 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidLatLngBoundsDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidLatLngBoundsDelegate.java @@ -22,7 +22,7 @@ import org.onepf.opfmaps.delegate.model.LatLngBoundsDelegate; import org.onepf.opfmaps.model.OPFLatLng; import org.onepf.opfmaps.model.OPFLatLngBounds; -import org.osmdroid.util.BoundingBoxE6; +import org.osmdroid.util.BoundingBox; import org.osmdroid.util.GeoPoint; import java.util.ArrayList; @@ -47,14 +47,14 @@ public OsmdroidLatLngBoundsDelegate[] newArray(final int size) { }; @NonNull - private final BoundingBoxE6 bounds; + private final BoundingBox bounds; - public OsmdroidLatLngBoundsDelegate(@NonNull final BoundingBoxE6 bounds) { + public OsmdroidLatLngBoundsDelegate(@NonNull final BoundingBox bounds) { this.bounds = bounds; } private OsmdroidLatLngBoundsDelegate(@NonNull final Parcel parcel) { - this.bounds = parcel.readParcelable(BoundingBoxE6.class.getClassLoader()); + this.bounds = parcel.readParcelable(BoundingBox.class.getClassLoader()); } @Override @@ -72,22 +72,22 @@ public OPFLatLng getCenter() { @Override public OPFLatLngBounds including(@NonNull final OPFLatLng point) { final ArrayList geoPoints = new ArrayList<>(3); - geoPoints.add(new GeoPoint(bounds.getLatNorthE6(), bounds.getLonEastE6())); - geoPoints.add(new GeoPoint(bounds.getLatSouthE6(), bounds.getLonWestE6())); + geoPoints.add(new GeoPoint(bounds.getLatNorth(), bounds.getLonEast())); + geoPoints.add(new GeoPoint(bounds.getLatSouth(), bounds.getLonWest())); geoPoints.add(new GeoPoint(point.getLat(), point.getLng())); - return new OPFLatLngBounds(new OsmdroidLatLngBoundsDelegate(BoundingBoxE6.fromGeoPoints(geoPoints))); + return new OPFLatLngBounds(new OsmdroidLatLngBoundsDelegate(BoundingBox.fromGeoPoints(geoPoints))); } @NonNull @Override public OPFLatLng getNortheast() { - return new OPFLatLng(new OsmdroidLatLngDelegate(new GeoPoint(bounds.getLatNorthE6(), bounds.getLonEastE6()))); + return new OPFLatLng(new OsmdroidLatLngDelegate(new GeoPoint(bounds.getLatNorth(), bounds.getLonEast()))); } @NonNull @Override public OPFLatLng getSouthwest() { - return new OPFLatLng(new OsmdroidLatLngDelegate(new GeoPoint(bounds.getLatSouthE6(), bounds.getLonWestE6()))); + return new OPFLatLng(new OsmdroidLatLngDelegate(new GeoPoint(bounds.getLatSouth(), bounds.getLonWest()))); } @Override @@ -133,7 +133,7 @@ public LatLngBoundsDelegate.Builder include(@NonNull final OPFLatLng latLng) { @NonNull @Override public OPFLatLngBounds build() { - return new OPFLatLngBounds(new OsmdroidLatLngBoundsDelegate(BoundingBoxE6.fromGeoPoints( + return new OPFLatLngBounds(new OsmdroidLatLngBoundsDelegate(BoundingBox.fromGeoPoints( new ArrayList<>(geoPoints) ))); } diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidMarkerDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidMarkerDelegate.java index 95f1c95..44ba3c0 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidMarkerDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidMarkerDelegate.java @@ -22,9 +22,9 @@ import org.onepf.opfmaps.delegate.model.MarkerDelegate; import org.onepf.opfmaps.model.OPFBitmapDescriptor; import org.onepf.opfmaps.model.OPFLatLng; -import org.osmdroid.bonuspack.overlays.Marker; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapView; +import org.osmdroid.views.overlay.Marker; /** * @author Roman Savin diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidPolygonDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidPolygonDelegate.java index df0102c..b7518bb 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidPolygonDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidPolygonDelegate.java @@ -22,9 +22,9 @@ import org.onepf.opfmaps.delegate.model.PolygonDelegate; import org.onepf.opfmaps.model.OPFLatLng; import org.onepf.opfutils.OPFLog; -import org.osmdroid.bonuspack.overlays.Polygon; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapView; +import org.osmdroid.views.overlay.Polygon; import java.util.ArrayList; import java.util.List; diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidPolylineDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidPolylineDelegate.java index 3d7af69..b864fa1 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidPolylineDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidPolylineDelegate.java @@ -22,9 +22,9 @@ import org.onepf.opfmaps.delegate.model.PolylineDelegate; import org.onepf.opfmaps.model.OPFLatLng; import org.onepf.opfutils.OPFLog; -import org.osmdroid.bonuspack.overlays.Polyline; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapView; +import org.osmdroid.views.overlay.Polyline; import java.util.ArrayList; import java.util.List; diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidVisibleRegionDelegate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidVisibleRegionDelegate.java index b446be1..7a9c7da 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidVisibleRegionDelegate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/delegate/model/OsmdroidVisibleRegionDelegate.java @@ -23,7 +23,7 @@ import org.onepf.opfmaps.delegate.model.VisibleRegionDelegate; import org.onepf.opfmaps.model.OPFLatLng; import org.onepf.opfmaps.model.OPFLatLngBounds; -import org.osmdroid.util.BoundingBoxE6; +import org.osmdroid.util.BoundingBox; import org.osmdroid.util.GeoPoint; /** @@ -57,7 +57,7 @@ public OsmdroidVisibleRegionDelegate(@NonNull final OPFLatLng nearLeft, new GeoPoint(nearRight.getLat(), nearRight.getLng()), new GeoPoint(farLeft.getLat(), farLeft.getLng()), new GeoPoint(farRight.getLat(), farRight.getLng()), - new BoundingBoxE6( + new BoundingBox( latLngBounds.getNortheast().getLat(), latLngBounds.getNortheast().getLng(), latLngBounds.getSouthwest().getLat(), diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/CameraUpdate.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/CameraUpdate.java index 64b4acd..deca5d7 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/CameraUpdate.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/CameraUpdate.java @@ -21,7 +21,7 @@ import android.support.annotation.Nullable; import org.onepf.opfmaps.utils.CompareUtils; -import org.osmdroid.util.BoundingBoxE6; +import org.osmdroid.util.BoundingBox; import org.osmdroid.util.GeoPoint; /** @@ -50,7 +50,7 @@ public enum CameraUpdateSource { @Nullable private final GeoPoint center; @Nullable - private final BoundingBoxE6 bounds; + private final BoundingBox bounds; @Nullable private final Point focus; private final float zoom; @@ -65,7 +65,7 @@ public enum CameraUpdateSource { @SuppressWarnings("PMD.ExcessiveParameterList") private CameraUpdate(@NonNull final CameraUpdateSource cameraUpdateSource, @Nullable final GeoPoint center, - @Nullable final BoundingBoxE6 bounds, + @Nullable final BoundingBox bounds, @Nullable final Point focus, final float zoom, final float bearing, @@ -99,7 +99,7 @@ public GeoPoint getCenter() { } @Nullable - public BoundingBoxE6 getBounds() { + public BoundingBox getBounds() { return bounds; } @@ -185,7 +185,7 @@ static final class Builder { @Nullable private GeoPoint center; @Nullable - private BoundingBoxE6 bounds; + private BoundingBox bounds; @Nullable private Point focus; private float zoom; @@ -207,7 +207,7 @@ Builder setCenter(@NonNull final GeoPoint center) { } @NonNull - Builder setBounds(@NonNull final BoundingBoxE6 bounds) { + Builder setBounds(@NonNull final BoundingBox bounds) { this.bounds = bounds; return this; } diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/CameraUpdateFactory.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/CameraUpdateFactory.java index 0040f1a..cea7c4f 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/CameraUpdateFactory.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/CameraUpdateFactory.java @@ -19,7 +19,7 @@ import android.graphics.Point; import android.support.annotation.NonNull; -import org.osmdroid.util.BoundingBoxE6; +import org.osmdroid.util.BoundingBox; import org.osmdroid.util.GeoPoint; import static org.onepf.opfmaps.osmdroid.model.CameraUpdate.CameraUpdateSource.BOUNDS_PADDING; @@ -59,7 +59,7 @@ public static CameraUpdate newLatLng(@NonNull final GeoPoint center) { } @NonNull - public static CameraUpdate newLatLngBounds(@NonNull final BoundingBoxE6 bounds, + public static CameraUpdate newLatLngBounds(@NonNull final BoundingBox bounds, final int padding) { return new CameraUpdate.Builder(BOUNDS_PADDING) .setBounds(bounds) @@ -68,7 +68,7 @@ public static CameraUpdate newLatLngBounds(@NonNull final BoundingBoxE6 bounds, } @NonNull - public static CameraUpdate newLatLngBounds(@NonNull final BoundingBoxE6 bounds, + public static CameraUpdate newLatLngBounds(@NonNull final BoundingBox bounds, final int width, final int height, final int padding) { diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/GroundOverlayOptions.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/GroundOverlayOptions.java index 379a6ac..ceac190 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/GroundOverlayOptions.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/GroundOverlayOptions.java @@ -23,7 +23,7 @@ import org.onepf.opfmaps.utils.CompareUtils; import org.onepf.opfutils.OPFLog; -import org.osmdroid.util.BoundingBoxE6; +import org.osmdroid.util.BoundingBox; import org.osmdroid.util.GeoPoint; /** @@ -47,7 +47,7 @@ public GroundOverlayOptions[] newArray(final int size) { private static final float CIRCLE_DEGREES = 360F; @Nullable - private BoundingBoxE6 bounds; + private BoundingBox bounds; @Nullable private GeoPoint location; @Nullable @@ -64,7 +64,7 @@ public GroundOverlayOptions() { } private GroundOverlayOptions(@NonNull final Parcel parcel) { - this.bounds = parcel.readParcelable(BoundingBoxE6.class.getClassLoader()); + this.bounds = parcel.readParcelable(BoundingBox.class.getClassLoader()); this.location = parcel.readParcelable(GeoPoint.class.getClassLoader()); this.image = parcel.readParcelable(BitmapDescriptor.class.getClassLoader()); this.bearing = parcel.readFloat(); @@ -105,7 +105,7 @@ public float getBearing() { } @Nullable - public BoundingBoxE6 getBounds() { + public BoundingBox getBounds() { return this.bounds; } @@ -180,7 +180,7 @@ public GroundOverlayOptions position(@Nullable final GeoPoint location, final fl } @NonNull - public GroundOverlayOptions positionFromBounds(@Nullable final BoundingBoxE6 bounds) { + public GroundOverlayOptions positionFromBounds(@Nullable final BoundingBox bounds) { if (this.location != null) { throw new IllegalStateException("Position has already been set using position: " + this.location); } else { diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/VisibleRegion.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/VisibleRegion.java index dfdd213..a294341 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/VisibleRegion.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/model/VisibleRegion.java @@ -21,7 +21,7 @@ import android.support.annotation.NonNull; import org.onepf.opfmaps.utils.CompareUtils; -import org.osmdroid.util.BoundingBoxE6; +import org.osmdroid.util.BoundingBox; import org.osmdroid.util.GeoPoint; /** @@ -51,13 +51,13 @@ public VisibleRegion[] newArray(final int size) { @NonNull private final GeoPoint farRight; @NonNull - private final BoundingBoxE6 latLngBounds; + private final BoundingBox latLngBounds; public VisibleRegion(@NonNull final GeoPoint nearLeft, @NonNull final GeoPoint nearRight, @NonNull final GeoPoint farLeft, @NonNull final GeoPoint farRight, - @NonNull final BoundingBoxE6 bounds) { + @NonNull final BoundingBox bounds) { this.nearLeft = nearLeft; this.nearRight = nearRight; this.farLeft = farLeft; @@ -70,7 +70,7 @@ private VisibleRegion(@NonNull final Parcel parcel) { this.nearRight = parcel.readParcelable(GeoPoint.class.getClassLoader()); this.farLeft = parcel.readParcelable(GeoPoint.class.getClassLoader()); this.farRight = parcel.readParcelable(GeoPoint.class.getClassLoader()); - this.latLngBounds = parcel.readParcelable(BoundingBoxE6.class.getClassLoader()); + this.latLngBounds = parcel.readParcelable(BoundingBox.class.getClassLoader()); } @NonNull @@ -94,7 +94,7 @@ public GeoPoint getFarRight() { } @NonNull - public BoundingBoxE6 getLatLngBounds() { + public BoundingBox getLatLngBounds() { return latLngBounds; } diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ClickListenerOverlay.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ClickListenerOverlay.java index a3fb75c..e379d3a 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ClickListenerOverlay.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ClickListenerOverlay.java @@ -78,7 +78,7 @@ public void setOnMapLongClickListener(@Nullable final OPFOnMapLongClickListener } @Override - protected void draw(final Canvas c, final MapView osmv, final boolean shadow) { + public void draw(final Canvas c, final MapView osmv, final boolean shadow) { // No drawing necessary } } diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ClickableCompassOverlay.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ClickableCompassOverlay.java index 972b918..ec86343 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ClickableCompassOverlay.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ClickableCompassOverlay.java @@ -21,8 +21,6 @@ import android.view.Display; import android.view.MotionEvent; import android.view.WindowManager; -import org.osmdroid.DefaultResourceProxyImpl; -import org.osmdroid.ResourceProxy; import org.osmdroid.views.MapView; import org.osmdroid.views.overlay.compass.CompassOverlay; import org.osmdroid.views.overlay.compass.IOrientationProvider; @@ -43,17 +41,16 @@ public ClickableCompassOverlay(@NonNull final Context context, @NonNull final Ma this(context, new InternalCompassOrientationProvider(context), mapView); } - public ClickableCompassOverlay(@NonNull final Context context, + /*public ClickableCompassOverlay(@NonNull final Context context, @NonNull final IOrientationProvider orientationProvider, @NonNull final MapView mapView) { this(context, orientationProvider, mapView, new DefaultResourceProxyImpl(context)); - } + }*/ public ClickableCompassOverlay(@NonNull final Context context, @NonNull final IOrientationProvider orientationProvider, - @NonNull final MapView mapView, - @NonNull final ResourceProxy resourceProxy) { - super(context, orientationProvider, mapView, resourceProxy); + @NonNull final MapView mapView) { + super(context, orientationProvider, mapView); setCompassCenter(COMPASS_CENTER_X, COMPASS_CENTER_Y); final WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/MarkerInfoWindow.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/MarkerInfoWindow.java index 7807fdf..42d1bc5 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/MarkerInfoWindow.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/MarkerInfoWindow.java @@ -21,10 +21,10 @@ import android.widget.FrameLayout; import org.onepf.opfmaps.osmdroid.R; -import org.osmdroid.bonuspack.overlays.InfoWindow; -import org.osmdroid.bonuspack.overlays.Marker; import org.osmdroid.views.MapView; +import org.osmdroid.views.overlay.Marker; import org.osmdroid.views.overlay.Overlay; +import org.osmdroid.views.overlay.infowindow.InfoWindow; import java.util.List; diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/MyLocationOverlayWithButton.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/MyLocationOverlayWithButton.java index e6d5da7..df8eabe 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/MyLocationOverlayWithButton.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/MyLocationOverlayWithButton.java @@ -29,8 +29,6 @@ import org.onepf.opfmaps.osmdroid.R; import org.onepf.opfmaps.listener.OPFOnMyLocationButtonClickListener; -import org.osmdroid.DefaultResourceProxyImpl; -import org.osmdroid.ResourceProxy; import org.osmdroid.api.IMapController; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapView; @@ -79,17 +77,16 @@ public MyLocationOverlayWithButton(final Context context, final MapView mapView) this(context, new GpsMyLocationProvider(context), mapView); } - public MyLocationOverlayWithButton(final Context context, + /*public MyLocationOverlayWithButton(final Context context, final IMyLocationProvider myLocationProvider, final MapView mapView) { this(context, myLocationProvider, mapView, new DefaultResourceProxyImpl(context)); - } + }*/ public MyLocationOverlayWithButton(final Context context, final IMyLocationProvider myLocationProvider, - final MapView mapView, - final ResourceProxy resourceProxy) { - super(myLocationProvider, mapView, resourceProxy); + final MapView mapView) { + super(myLocationProvider, mapView); this.goToMyLocationPicture = BitmapFactory .decodeResource(context.getResources(), R.drawable.ic_my_location); @@ -98,7 +95,7 @@ public MyLocationOverlayWithButton(final Context context, } @Override - protected void draw(final Canvas canvas, final MapView mapView, final boolean shadow) { + public void draw(final Canvas canvas, final MapView mapView, final boolean shadow) { super.draw(canvas, mapView, shadow); if (centerX == 0 && centerY == 0) { centerX = mapView.getWidth() - CENTER_OFFSET_DP * mScale; diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/RotationGestureOverlay.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/RotationGestureOverlay.java index 1701295..dbe6452 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/RotationGestureOverlay.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/RotationGestureOverlay.java @@ -51,7 +51,7 @@ public RotationGestureOverlay(@NonNull final Context context, @NonNull final Map } @Override - protected void draw(final Canvas c, final MapView osmv, final boolean shadow) { + public void draw(final Canvas c, final MapView osmv, final boolean shadow) { // No drawing necessary } diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ScrollGesturesOverlay.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ScrollGesturesOverlay.java index cc4c1bd..9f679b9 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ScrollGesturesOverlay.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/ScrollGesturesOverlay.java @@ -20,7 +20,6 @@ import android.graphics.Canvas; import android.view.MotionEvent; -import org.osmdroid.ResourceProxy; import org.osmdroid.views.MapView; import org.osmdroid.views.overlay.Overlay; @@ -36,9 +35,9 @@ public ScrollGesturesOverlay(final Context ctx) { super(ctx); } - public ScrollGesturesOverlay(final ResourceProxy pResourceProxy) { + /*public ScrollGesturesOverlay(final ResourceProxy pResourceProxy) { super(pResourceProxy); - } + }*/ public void setScrollGesturesEnabled(final boolean enabled) { this.isScrollGesturesEnabled = enabled; @@ -58,7 +57,7 @@ public boolean onTouchEvent(final MotionEvent event, final MapView mapView) { } @Override - protected void draw(final Canvas c, final MapView osmv, final boolean shadow) { + public void draw(final Canvas c, final MapView osmv, final boolean shadow) { //nothing } } diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/compass/CompassRotationOrientationProvider.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/compass/CompassRotationOrientationProvider.java index 40b19b8..9c3f3e8 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/compass/CompassRotationOrientationProvider.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/overlay/compass/CompassRotationOrientationProvider.java @@ -63,6 +63,11 @@ public float getLastKnownOrientation() { return orientation; } + @Override + public void destroy() { + + } + @Override public void onRotate(final float degrees) { orientation = degrees % CIRCLE_DEGREES + ROTATION_COEFFICIENT * screenRotation; diff --git a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/utils/ConvertUtils.java b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/utils/ConvertUtils.java index 9fa8b7b..62f3a24 100644 --- a/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/utils/ConvertUtils.java +++ b/opfmaps-providers/osmdroid/src/main/java/org/onepf/opfmaps/osmdroid/utils/ConvertUtils.java @@ -37,12 +37,12 @@ import org.onepf.opfmaps.model.OPFPolygonOptions; import org.onepf.opfmaps.model.OPFPolylineOptions; import org.osmdroid.bonuspack.overlays.GroundOverlay; -import org.osmdroid.bonuspack.overlays.Marker; -import org.osmdroid.bonuspack.overlays.Polygon; -import org.osmdroid.bonuspack.overlays.Polyline; import org.osmdroid.tileprovider.tilesource.ITileSource; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapView; +import org.osmdroid.views.overlay.Marker; +import org.osmdroid.views.overlay.Polygon; +import org.osmdroid.views.overlay.Polyline; import java.util.ArrayList; import java.util.List; @@ -117,7 +117,7 @@ public static OsmdroidCircleDelegate convertCircleOptions(@NonNull final MapView final OsmdroidCircleDelegate circleDelegate = new OsmdroidCircleDelegate( mapView, - new Polygon(mapView.getContext()), + new Polygon(), new GeoPoint(opfCenter.getLat(), opfCenter.getLng()), options.getRadius() ); @@ -133,7 +133,7 @@ public static OsmdroidCircleDelegate convertCircleOptions(@NonNull final MapView @NonNull public static GroundOverlay convertGroundOverlayOptions(@NonNull final Context context, @NonNull final OPFGroundOverlayOptions options) { - final GroundOverlay groundOverlay = new GroundOverlay(context); + final GroundOverlay groundOverlay = new GroundOverlay(); groundOverlay.setBearing(options.getBearing()); groundOverlay.setTransparency(options.getTransparency()); @@ -225,7 +225,7 @@ public static Polygon convertPolygonOptions(@NonNull final Context context, @Non @NonNull public static Polyline convertPolylineOptions(@NonNull final Context context, @NonNull final OPFPolylineOptions options) { - final Polyline polyline = new Polyline(context); + final Polyline polyline = new Polyline(); polyline.setColor(options.getColor()); polyline.setGeodesic(options.isGeodesic()); polyline.setVisible(options.isVisible()); diff --git a/opfmaps-providers/yandex-web/build.gradle b/opfmaps-providers/yandex-web/build.gradle index ba1f731..266e5f7 100644 --- a/opfmaps-providers/yandex-web/build.gradle +++ b/opfmaps-providers/yandex-web/build.gradle @@ -21,7 +21,7 @@ android { defaultConfig { minSdkVersion 15 targetSdkVersion 23 - versionName "0.1.1" + versionName "0.1.6" } lintOptions { @@ -34,5 +34,6 @@ android { dependencies { compile 'org.onepf:opfmaps:0.1.1@aar' provided 'org.onepf:opfutils:0.1.26' + provided 'com.android.support:support-annotations:23.1.0' } diff --git a/opfmaps/build.gradle b/opfmaps/build.gradle index f02ce0a..8bba1c5 100644 --- a/opfmaps/build.gradle +++ b/opfmaps/build.gradle @@ -32,7 +32,7 @@ android { defaultConfig { minSdkVersion 15 targetSdkVersion 23 - versionName "0.1.1" + versionName "0.1.5" } } diff --git a/opfmaps/gradle.properties b/opfmaps/gradle.properties index 40cbab0..b450c52 100644 --- a/opfmaps/gradle.properties +++ b/opfmaps/gradle.properties @@ -18,6 +18,6 @@ POM_NAME = OPFMaps library POM_ARTIFACT_ID = opfmaps POM_DESCRIPTION = OPFMaps library wrap map providers to comfort work on different android versions from different vendors POM_PACKAGING = aar -POM_SCM_URL = https://github.com/onepf/OPFMaps.git -POM_SCM_CONNECTION = scm:git@github.com:onepf/OPFMaps.git -POM_SCM_DEV_CONNECTION = scm:git@github.com:onepf/OPFMaps.git \ No newline at end of file +POM_SCM_URL = https://github.com/siekierskip/OPFMaps.git +POM_SCM_CONNECTION = scm:git@github.com:siekierskip/OPFMaps.git +POM_SCM_DEV_CONNECTION = scm:git@github.com:siekierskip/OPFMaps.git \ No newline at end of file diff --git a/opfmaps/proguard-rules.pro b/opfmaps/proguard-rules.pro index 6c45066..550f138 100644 --- a/opfmaps/proguard-rules.pro +++ b/opfmaps/proguard-rules.pro @@ -14,4 +14,4 @@ # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; -#} +#} \ No newline at end of file diff --git a/opfmaps/src/main/AndroidManifest.xml b/opfmaps/src/main/AndroidManifest.xml index 9125c30..fa9f381 100644 --- a/opfmaps/src/main/AndroidManifest.xml +++ b/opfmaps/src/main/AndroidManifest.xml @@ -14,13 +14,13 @@ ~ limitations under the License. --> - + + + + + + + - - - - - diff --git a/opfmaps/src/main/java/org/onepf/opfmaps/OPFMapFragment.java b/opfmaps/src/main/java/org/onepf/opfmaps/OPFMapFragment.java index 824938e..d5b6f9c 100644 --- a/opfmaps/src/main/java/org/onepf/opfmaps/OPFMapFragment.java +++ b/opfmaps/src/main/java/org/onepf/opfmaps/OPFMapFragment.java @@ -17,11 +17,11 @@ package org.onepf.opfmaps; import android.app.Activity; -import android.app.Fragment; import android.os.Bundle; import android.support.annotation.MainThread; import android.support.annotation.NonNull; import android.support.annotation.Nullable; +import android.support.v4.app.Fragment; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; diff --git a/samples/multimapsexample/build.gradle b/samples/multimapsexample/build.gradle index f3534b6..ec0f417 100644 --- a/samples/multimapsexample/build.gradle +++ b/samples/multimapsexample/build.gradle @@ -56,26 +56,36 @@ check { abortOnError false } +repositories { + mavenCentral() + maven { url "https://jitpack.io" } + flatDir { + dirs 'libs' + } +} + dependencies { compile 'com.android.support:appcompat-v7:23.1.0' - compile 'org.onepf:opfmaps:0.1.1@aar' - compile 'org.onepf:opfmaps-amazon:0.1.1@aar' - compile 'org.onepf:opfmaps-google:0.1.1@aar' - compile 'org.onepf:opfmaps-osmdroid:0.1.1@aar' - compile 'org.onepf:opfmaps-yandex-web:0.1.1@aar' +// compile 'org.onepf:opfmaps:0.1.1@aar' + compile(name: 'opfmaps-debug', ext: 'aar') - compile 'org.onepf:opfutils:0.1.26' +// compile 'org.onepf:opfmaps-amazon:0.1.1@aar' +// compile 'com.amazon:amazon-maps-api:2.0' - //for opfmaps-amazon - compile 'com.amazon:amazon-maps-api:2.0' +// compile 'org.onepf:opfmaps-google:0.1.1@aar' + compile(name: 'google-debug', ext: 'aar') + compile 'com.google.android.gms:play-services-maps:10.0.1' - //for opfmaps-google - compile 'com.google.android.gms:play-services-maps:8.1.0' +// compile 'org.onepf:opfmaps-osmdroid:0.1.1@aar' + compile(name: 'osmdroid-debug', ext: 'aar') + compile 'org.osmdroid:osmdroid-android:5.6.4' + compile 'com.github.MKergall:osmbonuspack:6.3' + +// compile 'org.onepf:opfmaps-yandex-web:0.1.1@aar' + + compile 'org.onepf:opfutils:0.1.26' - //for opfmaps-osmdroid - compile 'org.osmdroid:osmdroid-android:4.3' - compile 'org.osmdroid:bonuspack:5.3' compile 'org.slf4j:slf4j-android:1.7.12' compile 'org.apache.commons:commons-lang3:3.4' compile 'com.google.code.gson:gson:2.3.1' diff --git a/samples/multimapsexample/libs/google-debug.aar b/samples/multimapsexample/libs/google-debug.aar new file mode 100644 index 0000000..9dcd3f5 Binary files /dev/null and b/samples/multimapsexample/libs/google-debug.aar differ diff --git a/samples/multimapsexample/libs/opfmaps-debug.aar b/samples/multimapsexample/libs/opfmaps-debug.aar new file mode 100644 index 0000000..7756e59 Binary files /dev/null and b/samples/multimapsexample/libs/opfmaps-debug.aar differ diff --git a/samples/multimapsexample/libs/osmdroid-debug.aar b/samples/multimapsexample/libs/osmdroid-debug.aar new file mode 100644 index 0000000..a5c90c2 Binary files /dev/null and b/samples/multimapsexample/libs/osmdroid-debug.aar differ diff --git a/samples/multimapsexample/src/main/AndroidManifest.xml b/samples/multimapsexample/src/main/AndroidManifest.xml index d2425e7..40357b9 100644 --- a/samples/multimapsexample/src/main/AndroidManifest.xml +++ b/samples/multimapsexample/src/main/AndroidManifest.xml @@ -18,6 +18,14 @@ + + + + + + + + Google Osmdroid Yandex Web + Some permissions is required to work app