forked from organicmaps/organicmaps
Merge pull request #1413 from rokuz/fixed-start-point-disappear
Fixed appearing of start point in routing mode
This commit is contained in:
commit
f8a4e08a53
3 changed files with 5 additions and 11 deletions
|
@ -545,7 +545,8 @@ public class RoutingController
|
|||
if (mStartPoint == null)
|
||||
Framework.nativeSetRouteStartPoint(0.0, 0.0, false);
|
||||
else
|
||||
Framework.nativeSetRouteStartPoint(mStartPoint.getLat(), mStartPoint.getLon(), true);
|
||||
Framework.nativeSetRouteStartPoint(mStartPoint.getLat(), mStartPoint.getLon(),
|
||||
!(mStartPoint instanceof MapObject.MyPosition));
|
||||
|
||||
if (mEndPoint == null)
|
||||
Framework.nativeSetRouteEndPoint(0.0, 0.0, false);
|
||||
|
|
|
@ -340,13 +340,6 @@ void FrontendRenderer::AcceptMessage(ref_ptr<Message> message)
|
|||
m2::PointD const startPoint = routeData->m_sourcePolyline.Front();
|
||||
m2::PointD const finishPoint = routeData->m_sourcePolyline.Back();
|
||||
m_routeRenderer->SetRouteData(move(routeData), make_ref(m_gpuProgramManager));
|
||||
if (!m_routeRenderer->GetStartPoint())
|
||||
{
|
||||
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread,
|
||||
make_unique_dp<CacheRouteSignMessage>(startPoint, true /* isStart */,
|
||||
true /* isValid */),
|
||||
MessagePriority::High);
|
||||
}
|
||||
if (!m_routeRenderer->GetFinishPoint())
|
||||
{
|
||||
m_commutator->PostMessage(ThreadsCommutator::ResourceUploadThread,
|
||||
|
|
|
@ -297,7 +297,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
[self buildRoute];
|
||||
|
||||
auto & f = GetFramework();
|
||||
f.SetRouteStartPoint(from.Point(), true /* isValid */);
|
||||
f.SetRouteStartPoint(from.Point(), !from.IsMyPosition());
|
||||
f.SetRouteFinishPoint(to.Point(), to != MWMRoutePoint::MWMRoutePointZero());
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
self.searchManager.state = MWMSearchManagerStateHidden;
|
||||
[self buildRoute];
|
||||
|
||||
GetFramework().SetRouteStartPoint(from.Point(), from != MWMRoutePoint::MWMRoutePointZero());
|
||||
GetFramework().SetRouteStartPoint(from.Point(), from != MWMRoutePoint::MWMRoutePointZero() && !from.IsMyPosition());
|
||||
}
|
||||
|
||||
- (void)buildRouteTo:(MWMRoutePoint const &)to
|
||||
|
@ -490,7 +490,7 @@ extern NSString * const kAlohalyticsTapEventKey;
|
|||
|
||||
auto & f = GetFramework();
|
||||
f.SetRouteStartPoint(self.routeSource.Point(),
|
||||
self.routeSource != MWMRoutePoint::MWMRoutePointZero());
|
||||
self.routeSource != MWMRoutePoint::MWMRoutePointZero() && !self.routeSource.IsMyPosition());
|
||||
|
||||
f.SetRouteFinishPoint(self.routeDestination.Point(),
|
||||
self.routeDestination != MWMRoutePoint::MWMRoutePointZero());
|
||||
|
|
Loading…
Add table
Reference in a new issue