diff --git a/lib/AndroidManifest.xml b/lib/AndroidManifest.xml index ed54f28..bc1f234 100644 --- a/lib/AndroidManifest.xml +++ b/lib/AndroidManifest.xml @@ -2,4 +2,9 @@ package="com.mapwithme.maps.api" android:versionCode="1" android:versionName="1.0" > + + + \ No newline at end of file diff --git a/lib/src/com/mapswithme/maps/api/Const.java b/lib/src/com/mapswithme/maps/api/Const.java index 3393e47..609f338 100644 --- a/lib/src/com/mapswithme/maps/api/Const.java +++ b/lib/src/com/mapswithme/maps/api/Const.java @@ -34,6 +34,7 @@ public class Const public static final String EXTRA_HAS_PENDING_INTENT = AUTHORITY + ".has_pen_intent"; public static final String EXTRA_CALLER_PENDING_INTENT = AUTHORITY + ".pending_intent"; public static final String EXTRA_RETURN_ON_BALLOON_CLICK = AUTHORITY + ".return_on_balloon_click"; + public static final String EXTRA_PICK_POINT = AUTHORITY + ".pick_point"; /* Response extras */ diff --git a/lib/src/com/mapswithme/maps/api/MapsWithMeApi.java b/lib/src/com/mapswithme/maps/api/MapsWithMeApi.java index 0600628..e7fd9cd 100644 --- a/lib/src/com/mapswithme/maps/api/MapsWithMeApi.java +++ b/lib/src/com/mapswithme/maps/api/MapsWithMeApi.java @@ -135,6 +135,15 @@ public final class MapsWithMeApi sendRequest(caller, request); } + public static void pickPoint(Activity caller, String title, PendingIntent pi) + { + final MwmRequest request = new MwmRequest() + .setTitle(title) + .setPickPointMode(true) + .setPendingIntent(pi); + sendRequest(caller, request); + } + /** * Detects if any version (Lite, Pro) of MapsWithMe, which supports API calls * are installed on the device. diff --git a/lib/src/com/mapswithme/maps/api/MwmRequest.java b/lib/src/com/mapswithme/maps/api/MwmRequest.java index 61e53b6..10a65da 100644 --- a/lib/src/com/mapswithme/maps/api/MwmRequest.java +++ b/lib/src/com/mapswithme/maps/api/MwmRequest.java @@ -21,6 +21,7 @@ public class MwmRequest private String mTitle; private double mZoomLevel = 1; private boolean mReturnOnBalloonClick; + private boolean mPickPoint = false; // ** public MwmRequest setTitle(String title) @@ -29,6 +30,12 @@ public class MwmRequest return this; } + MwmRequest setPickPointMode(boolean pickPoint) + { + mPickPoint = pickPoint; + return this; + } + public MwmRequest addPoint(MWMPoint point) { mPoints.add(point); @@ -75,6 +82,8 @@ public class MwmRequest mwmIntent.putExtra(Const.EXTRA_TITLE, mTitle); // more mwmIntent.putExtra(Const.EXTRA_RETURN_ON_BALLOON_CLICK, mReturnOnBalloonClick); + // pick point + mwmIntent.putExtra(Const.EXTRA_PICK_POINT, mPickPoint); final boolean hasIntent = mPendingIntent != null; mwmIntent.putExtra(Const.EXTRA_HAS_PENDING_INTENT, hasIntent);