forked from organicmaps/organicmaps
[deep links] fix for search on map deep link without cll parameter
This commit is contained in:
parent
3573e2febe
commit
00a432ebe2
2 changed files with 10 additions and 5 deletions
|
@ -1571,7 +1571,7 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
|||
return true;
|
||||
case ParsedUrlMwmRequest.RESULT_SEARCH:
|
||||
final ParsedSearchRequest request = Framework.nativeGetParsedSearchRequest();
|
||||
if (request.mIsSearchOnMap)
|
||||
if (request.mIsSearchOnMap && (request.mLat != 0.0 || request.mLon != 0.0))
|
||||
{
|
||||
Framework.nativeStopLocationFollow();
|
||||
Framework.nativeSetViewportCenter(request.mLat, request.mLon, SEARCH_IN_VIEWPORT_ZOOM);
|
||||
|
|
|
@ -271,10 +271,15 @@ using namespace osm_auth_ios;
|
|||
|
||||
if (request.m_isSearchOnMap)
|
||||
{
|
||||
ASSERT([self isDrapeEngineCreated], ());
|
||||
[MapViewController setViewport:request.m_centerLat
|
||||
lon:request.m_centerLon
|
||||
zoomLevel:kSearchInViewportZoom];
|
||||
// Set viewport only when cll parameter was provided in url.
|
||||
if (request.m_centerLat != 0.0 || request.m_centerLon != 0.0)
|
||||
{
|
||||
ASSERT([self isDrapeEngineCreated], ());
|
||||
[MapViewController setViewport:request.m_centerLat
|
||||
lon:request.m_centerLon
|
||||
zoomLevel:kSearchInViewportZoom];
|
||||
}
|
||||
|
||||
[manager searchTextOnMap:query forInputLocale:locale];
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue