Merge branch 'r3.9'
This commit is contained in:
commit
9ef1ad13c5
3 changed files with 37 additions and 3 deletions
|
@ -101,6 +101,14 @@ public class MapillaryPlugin extends OsmandPlugin {
|
||||||
return app.getString(R.string.mapillary);
|
return app.getString(R.string.mapillary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean init(@NonNull OsmandApplication app, Activity activity) {
|
||||||
|
if (activity instanceof MapActivity) {
|
||||||
|
mapActivity = (MapActivity) activity;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerLayers(MapActivity activity) {
|
public void registerLayers(MapActivity activity) {
|
||||||
createLayers();
|
createLayers();
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package net.osmand.plus.openplacereviews;
|
package net.osmand.plus.openplacereviews;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
@ -45,7 +46,6 @@ public class OpenPlaceReviewsPlugin extends OsmandPlugin {
|
||||||
return ID;
|
return ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return app.getString(R.string.open_place_reviews);
|
return app.getString(R.string.open_place_reviews);
|
||||||
|
@ -111,6 +111,15 @@ public class OpenPlaceReviewsPlugin extends OsmandPlugin {
|
||||||
return imageCards;
|
return imageCards;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ImageCard createContextMenuImageCard(@NonNull JSONObject imageObject) {
|
||||||
|
ImageCard imageCard = null;
|
||||||
|
if (mapActivity != null && imageObject != JSONObject.NULL) {
|
||||||
|
imageCard = createCardOpr(mapActivity, imageObject);
|
||||||
|
}
|
||||||
|
return imageCard;
|
||||||
|
}
|
||||||
|
|
||||||
private void getPicturesForPlace(List<ImageCard> result, String response) {
|
private void getPicturesForPlace(List<ImageCard> result, String response) {
|
||||||
try {
|
try {
|
||||||
if (!Algorithms.isEmpty(response)) {
|
if (!Algorithms.isEmpty(response)) {
|
||||||
|
@ -171,6 +180,14 @@ public class OpenPlaceReviewsPlugin extends OsmandPlugin {
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean init(@NonNull OsmandApplication app, Activity activity) {
|
||||||
|
if (activity instanceof MapActivity) {
|
||||||
|
mapActivity = (MapActivity) activity;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void disable(OsmandApplication app) {
|
public void disable(OsmandApplication app) {
|
||||||
if (app.getSettings().OPR_USE_DEV_URL.get()) {
|
if (app.getSettings().OPR_USE_DEV_URL.get()) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package net.osmand.plus.wikipedia;
|
package net.osmand.plus.wikipedia;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
|
@ -106,6 +107,14 @@ public class WikipediaPlugin extends OsmandPlugin {
|
||||||
this.mapActivity = null;
|
this.mapActivity = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean init(@NonNull OsmandApplication app, Activity activity) {
|
||||||
|
if (activity instanceof MapActivity) {
|
||||||
|
mapActivity = (MapActivity) activity;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void registerLayerContextMenuActions(OsmandMapTileView mapView,
|
protected void registerLayerContextMenuActions(OsmandMapTileView mapView,
|
||||||
ContextMenuAdapter adapter,
|
ContextMenuAdapter adapter,
|
||||||
|
|
Loading…
Reference in a new issue