MKMapView userLocation 未显示在 ipod 中
我用于
self.mapView.showsUserLocation = YES;
在 MKmapview 上显示蓝点(圆圈)。它在模拟器中工作正常。但当我在 iPod 中测试时,它没有显示。有人知道会是什么原因吗?提前致谢
i used
self.mapView.showsUserLocation = YES;
for showing blue dot (circle) on MKmapview. Its working fine in simulator. but when i tested in Ipod, its not showing. Anybody know what will be the reason ? thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果地图中也没有显示蓝色圆圈,则说明您的本地 wifi 网络不在系统中(在 iPod 上,您的位置由最近的 wifi ssid 确定)。有两种解决方案:将它们列出(不确定在哪里可以做到)或去某个有效的地方。在 iPhone 模拟器中,您会获得一个模拟位置,因此它的工作原理并不是那么有趣。
如果您在“地图”中看到蓝色圆圈,但在您的地图中没有看到,我们可以进一步查看。
If the blue circle doesn't show in Maps either, than your local wifi networks aren't in the system (on the iPod your locationis determined by the nearest wifi ssid's). Two solutions: get them listed (not sure where you can do that) or go somewhere where it does work. In the iPhone Simulator you get a simulated location, so not so interesting that it works.
If you get the blue circle in Maps but not in your map, we can look further at it.
iPod 是否位于同一无线网络上且启用了定位服务?
Is the iPod on the same, wireless network with location services enabled?
检查你是否已经给了代表 --->map.delegate=SomeController;
和
Check if u have given the delegates --->map.delegate=SomeController;
and