From fc852085dfcc097538b2aaf0b9ddcc497427df7c Mon Sep 17 00:00:00 2001 From: d-kunin Date: Wed, 11 Sep 2013 19:41:21 +0300 Subject: [PATCH] [feature] Added zoom level as return param. --- lib/src/com/mapswithme/maps/api/Const.java | 1 + lib/src/com/mapswithme/maps/api/MWMResponse.java | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib/src/com/mapswithme/maps/api/Const.java b/lib/src/com/mapswithme/maps/api/Const.java index 72d0418..8fbd196 100644 --- a/lib/src/com/mapswithme/maps/api/Const.java +++ b/lib/src/com/mapswithme/maps/api/Const.java @@ -44,6 +44,7 @@ public class Const public static final String EXTRA_MWM_RESPONSE_POINT_LAT = AUTHORITY + ".point_lat"; public static final String EXTRA_MWM_RESPONSE_POINT_LON = AUTHORITY + ".point_lon"; public static final String EXTRA_MWM_RESPONSE_POINT_ID = AUTHORITY + ".point_id"; + public static final String EXTRA_MWM_RESPONSE_ZOOM = AUTHORITY + ".zoom_level"; public static final String ACTION_MWM_REQUEST = AUTHORITY + ".request"; diff --git a/lib/src/com/mapswithme/maps/api/MWMResponse.java b/lib/src/com/mapswithme/maps/api/MWMResponse.java index 5219229..2e3db84 100644 --- a/lib/src/com/mapswithme/maps/api/MWMResponse.java +++ b/lib/src/com/mapswithme/maps/api/MWMResponse.java @@ -22,12 +22,14 @@ ******************************************************************************/ package com.mapswithme.maps.api; +import android.app.DownloadManager.Request; import android.content.Context; import android.content.Intent; public class MWMResponse { private MWMPoint mPoint; + private double mZoomLevel; /** * @@ -35,6 +37,7 @@ public class MWMResponse */ public MWMPoint getPoint() { return mPoint; } public boolean hasPoint() { return mPoint != null; } + public double getZoomLevel() { return mZoomLevel; } @Override public String toString() @@ -58,6 +61,9 @@ public class MWMResponse final String name = intent.getStringExtra(Const.EXTRA_MWM_RESPONSE_POINT_NAME); final String id = intent.getStringExtra(Const.EXTRA_MWM_RESPONSE_POINT_ID); + // parse additional info + response.mZoomLevel = intent.getDoubleExtra(Const.EXTRA_MWM_RESPONSE_ZOOM, 9); + if (lat != INVALID_LL && lon != INVALID_LL) response.mPoint = new MWMPoint(lat, lon, name, id); else