免费预览已结束,剩余20页可下载查看
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
an intro to mapkit,rob caporetto rob_caporetto,the plan,what is mapkit? adding mapkit to your iphone application setting the position annotations geocoding interacting with core location,what is mapkit?,embed maps in your app,adding mapkit to your app,adding mapkit to your app,add the mapkit & corelocation frameworks create a view controller which implements mkmapviewdelegate create an mkmapview instance and connect to the controller,setting the position,set the region property defines the center point and a span span defines the vertical & horizontal distance to display,setting the position,- (void)viewdidload mkcoordinateregion region; region.center.latitude = eventvenue.latitude doublevalue; region.center.longitude = eventvenue.longitude doublevalue; region.span.latitudedelta = 0.0039; region.span.longitudedelta = 0.0034; mapview.region = region; ,annotations,annotations,allow you to add places-of-interest to a map implemented with a model & a view,annotation models,implement the mkannotation protocol exposes a title, subtitle, and coordinate,annotation views,use mkannotationview easiest trick to set the image property use mkpinannotationview if you want the pin,managing annotation views,managed like uitableviewcells,managing annotation views,- (mkannotationview *)mapview:(mkmapview *)themapview viewforannotation:(id )annotation mkpinannotationview *annotationview = (mkpinannotationview *)(themapview dequeuereusableannotationviewwithidentifier:“annotation“); if (annotationview = null) annotationview = mkpinannotationview alloc initwithannotation:annotation reuseidentifier:“annotation“ autorelease; annotationview.canshowcallout = yes; annotationview.animatesdrop = yes; annotationview.annotation = annotation; return annotationview; ,geocoding,geocoding,convert landmarks into longitude/latitude and vice-versa sdk 3.0 supports reverse geocoding only,reverse geocoding,use mkreversegeocoder requires network access (wifi/3g/edge) asynchronous lookups,interacting with core location,showing the users location,set the showsuserlocation property on the mapview instance implement an annotation,showing the users location,- (void)viewdidload / other initialisation mapview.showsuserlocation = yes; ,showing the users location,- (mkannotationview *)mapview:(mkmapview *)themapview viewforannotation:(id )annotation / checks to see if we are going to add the annotation for the userss location. / if this is the case, then we dont bother with creating an annotation and let / the platform give us the blue dot. if (annotation = mapview.userlocation) return nil; / configuring other annotations ,r
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年宇宙法合同
- 浙江省温州市十五校联盟联合体2026届数学高二第一学期期末质量跟踪监视模拟试题含解析
- 西安市航空六一八中学2025年数学高一上期末检测试题含解析
- 单纯疱疹病毒Ⅱ型感染合并抗病毒个案护理
- 吐鲁番职业技术学院《数码摄影与后期制作》2024-2025学年第一学期期末试卷
- 重庆市外国语学校2025-2026学年高一物理第一学期期末考试试题含解析
- 上海市丰华中学2025年高一物理第一学期期末监测试题含解析
- 新疆昌吉玛纳斯县第一中学2025年高一上化学期中教学质量检测模拟试题含解析
- 两癌筛查前中后护理全周期管理实务
- 护理一般系统论在慢性病管理中的实践探索
- 2024-2025学年高二物理专项复习:动量【四大题型】(解析版)
- 小学古诗词教学与儿童心理健康的关系
- 《择菜洗菜与切菜》课件
- 小红书种草营销师(初级)认证考试题库(附答案)
- 《锂离子电池方向专业综合实验》课程教学大纲
- 增补协议 合同模板
- 机关事业单位试用干部转正定级呈报表
- 银行保安服务 投标方案(技术标)
- 【名创优品营销策略存在的问题及完善策略5700字(论文)】
- 国开(河北)2024年《法律工作者职业道德》形考任务1-4答案
- 消除医疗歧视管理制度
评论
0/150
提交评论