问题标签 [mkplacemark]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
20 浏览

class - 从引脚映射方向

我正在创建一个标记应用程序,用户可以在其中将街头艺术标记到地图上。我希望用户能够单击图钉 (i) 标注按钮并被带到 Apple Maps。

这个函数应该允许这种情况发生但是我得到一个错误“实例成员'坐标'不能用于类型'艺术'” -

函数 openInMaps() {

这是我的艺术课——

如果有人指出我正确的方向或告诉我我做错了什么,那就太好了!谢谢。

0 投票
2 回答
2849 浏览

xcode - addressDictionary 在 iOS 11.0 中首先被弃用

刚开始在 IOS11 上工作,将我的代码从 IOS10.3 移动到 IOS11 导致了以下挑战,而以下代码在 IOS11 之前可以工作:

……

现在使用 IOS11,它抱怨 PlaceMark.addressDictionary,而 addressDictionary 已被弃用。

addressDictionary' 已弃用:首先在 iOS 11.0 中弃用 - 使用 @properties

我试图这样做,但不幸的是,InitWithCoordinate 函数无论如何都需要 AddressDictionary。

我想知道有没有人有同样的问题,我知道它很新(IOS11昨天刚出)。

0 投票
1 回答
46 浏览

mapkit - 从人类可读的字符串创建 MKPlacemark/CLPlacemark

有没有办法MKPlacemark从人类可读的字符串创建一个,例如地标自己的description

我知道NSKeyedArchiver,但据我所知,它的输出不可读。

0 投票
1 回答
141 浏览

ios - 在 MapView (Swift) 中单击 MKPlacemark 时如何调用函数?

每当在我的 MapView 上单击 MKPlacemark 时,我都会尝试执行某个功能。此功能从地标中提取信息并将其显示在单独的视图中。我试过用

但这似乎不起作用。我不确定是否必须命名每个地标,我避免这样做,因为我已经在名称中显示位置数据(如我的代码中所示)。任何帮助将非常感激。我的代码:

启动地标(这种情况发生了很多次,变量已经被实例化了):

0 投票
0 回答
285 浏览

navigation - Apple Maps on iOS 13 says 'Directions Not Available' for openInMapsWithLaunchOptions

I am using Apple maps to show direction to a location from the users current location. The address details are updated in the addressDictionary as lat long are not present.

This works perfectly fine till iOS 12 for the same address. Now in iOS 13, it always says "Directions Not Available".

Has anyone else faced the situation and knows the solution?

0 投票
0 回答
22 浏览

swift - 如何用地标填充表格视图?

我希望用户选择一个特定的子管理区域。为此,我的计划是显示一个表格视图,其中包含所有管理区域(作为部分)和子管理区域(作为行)。关于我如何做到这一点的任何想法?在此处输入图像描述