




免费预览已结束,剩余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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 公开课教案教学设计鲁教初中语文七上看戏三(2025-2026学年)
- 模版购房合同
- 开发商解除购房合同
- 清淤换填合同
- 环境规划之大气部分教学教案(2025-2026学年)
- 4.15 第二次世界大战 说课稿 2025-2026学年统编版九年级历史下册
- 清华大学版·2016教学设计-2025-2026学年中职中职专业课财务会计类73 财经商贸大类
- 2025年纺织品交易合同模板
- 2025委托出版合同范本
- 苏科版九年级物理上册第十四章欧姆定律 动态电路分析 专题说课稿
- RUSLE模型在丹江流域土壤侵蚀研究中的应用
- 中医脏腑辩证医学
- 电子信息类专业导论(第3版)课件 02 移动通信1G-4G
- 2025年道路运输安全员考试题库及答案
- FZ-T50016-2023化学纤维燃烧性能试验方法氧指数法
- 发票分类分级管理办法
- 网络监控维护合同协议书
- 2025年党的知识竞赛试题库100题及答案(抢答版)
- 导管并发症处理
- 甲状腺疾病护理小讲课
- 集团教师培训管理办法
评论
0/150
提交评论