打开图形图布局 [英] Open Graph Map layout

查看:121
本文介绍了打开图形图布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功地发布了一个动作来打开Item附件布局图。不过我也想用地图附件布局发布一个动作。我的iOS应用程序有一个数组,坐标在地图上形成路线。
我看到无处不在,但只是找不到一个很好的教程,解释如何实现这一点。有人知道如何使用地图上的路线预览将动作发布到开放图表?

I succesfully posted an action to open graph with the 'Item' attachment layout. However I also want to post a action with the 'Map' attachment layout. My iOS app has an array with coordinates which form a route on a map. I looked everywhere but just cant find a good tutorial which explains how to achieve this. Does someone know how to post a action to the open graph with a route preview on the map?

推荐答案

当您创建自己的打开图形自定义对象,您需要将该对象的属性定义为GeoPoint,然后设置Is Array,如下所示:

When you are creating your Open Graph custom Objects, you need to define a property of that Object as a GeoPoint and then set 'Is Array', like this:

如果您包含这些信息,那么在发布操作时,应该会自动创建一个地图样式的新闻邮件。您还应该设置一个地图样式聚合。 此处有关信息

If you include this information, there should be a Map style newsfeed post automatically created when the action is published. You should also set up a Map style Aggregation. There is more info on this here.

您可以通过查看示例来查看如何创建这种复杂路由的示例,这里是来自Endomondo锻炼的一个例子:
http://pastebin.com/VEW2GU0t

You can see an example of how this sort of complex route is created by looking at an example, here is one from an Endomondo workout: http://pastebin.com/VEW2GU0t

这篇关于打开图形图布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆