ios - 启动导航 SKMAPS 后无法移动 map
<p><p>我已将 SKMAPVIEW 作为 subview 添加到我的 UIView,在获取开始和结束坐标后,我计算了路线并开始导航。在计算路线时,我可以根据需要移动 map 和缩放。</p>
<p>但是当我开始导航时,我无法移动 map ,但我可以放大或缩小 map .. 我应该怎么做才能在开始导航后移动 map .. . ???在此先感谢...</p>
<p>我还想根据指南针方向根据用户的当前方向旋转导航箭头。</p>
<pre><code>-(void)StartNavigation
{
///Navigation Settings
self.mapView.settings.showCompass = YES;
self.mapView.settings.followUserPosition = YES;
self.mapView.settings.headingMode = SKHeadingModeRotatingHeading;
SKNavigationSettings* navSettings = ;
navSettings.navigationType = SKNavigationTypeReal;
navSettings.distanceFormat=SKDistanceFormatMilesFeet;
navSettings.showStreetNamePopUpsOnRoute=YES;
// Navigation RouteAdvisor Settings
.mapView.settings.displayMode = SKMapDisplayMode2D;
SKAdvisorSettings *settings = ;
settings.advisorVoice = @"en_us";
settings.advisorType = SKAdvisorTypeTextToSpeech;
.advisorConfigurationSettings = settings;
[startNavigationWithSettings:navSettings];
}
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>确保您处于“平移”模式,类似于(从演示项目的代码中提取):</p>
<pre><code>self.mapView.settings.followUserPosition = NO;
self.mapView.settings.displayMode = SKMapDisplayMode2D;
</code></pre></p>
<p style="font-size: 20px;">关于ios - 启动导航 SKMAPS 后无法移动 map ,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/34448151/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/34448151/
</a>
</p>
页:
[1]