Open Graph Map layout

前提是你 提交于 2019-12-23 04:52:39

问题


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?


回答1:


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.

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



来源:https://stackoverflow.com/questions/13292346/open-graph-map-layout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!