关于地图的操作的代码片段
来源:互联网 发布:java 网络拓扑图开发 编辑:程序博客网 时间:2024/04/30 07:14
这种方法在application bundle的顶层文件夹寻找由供应的名字的图象 。 如果找到图片,装载到iPhone系统缓存图象。那意味图片是(理论上)放在内存里作为cache的。
图片cache极有可能不会响应 memory warnings and release its objects:
用图片的时候一定要小心的alloc和release
推荐使用
NSString *path = [[NSBundle mainBundle] pathForResource:@"icon" ofType:@"png"];
myImage = [UIImage imageWithContentsOfFile:path];
---------------------1-地图------------------------
//(1)创建MKMapView
//CGRect rect = CGRectMake(0, 0, 320, 460);
// supportMapView = [[MKMapView alloc] initWithFrame:rect];
//设定经纬度
CLLocationCoordinate2D theCoordinate;
theCoordinate.latitude=22.53705;
theCoordinate.longitude=114.08248;
//设定显示范围
// MKCoordinateSpan theSpan;
// theSpan.latitudeDelta=0.08;
// theSpan.longitudeDelta=0.08;
// //设置地图显示的中心及范围
// MKCoordinateRegion theRegion;
// theRegion.center=theCoordinate;
// theRegion.span=theSpan;
// //设置地图显示
// [supportMapView setMapType:MKMapTypeStandard];
// //[supportMapView setRegion:theRegion];
// [supportMapView setRegion:theRegion animated:YES];
// [supportMapView regionThatFits:theRegion];
//
// //(2)地图加标注
// SupportAnnotation *mapAnnotations=[[SupportAnnotation alloc] initWithCoordinate:theCoordinate];
// mapAnnotations.title ;
// mapAnnotations.subtitle
// [supportMapView addAnnotation:mapAnnotations];
// [mapAnnotations release];
//
// //
// [zoomOutButton setHidden:FALSE];
// [zoonInButton setHidden:TRUE];
// [zoomOutView setHidden:TRUE];
- 关于地图的操作的代码片段
- 【Matlab】关于Matlab的一些代码片段
- 代码片段的导入
- 实用的代码片段
- 有用的代码片段
- 我的代码片段
- 可用的代码片段
- 有趣的代码片段
- 有用的代码片段
- 有用的代码片段
- 代码片段的备份
- 代码片段的转移
- Adapter的代码片段
- XAF之操作ApplicationModel的有用代码片段
- 不可错过的10个超棒jQuery表单操作代码片段
- 10 个实用的 jQuery 表单操作代码片段
- 10 个实用的 jQuery 表单操作代码片段
- 不可错过的10个超棒jQuery表单操作代码片段
- Hadoop完全分布式配置
- Maven 环境快速搭建二(eclipse+maven2+jetty)
- 三个水杯盛两个4L水
- astar 百度的新大厦
- 【Java SE】对象的序列化与反序列化3:SerialversionUID
- 关于地图的操作的代码片段
- Ubuntu下配置NFS服务器和客户端
- SQL中两个关联表批量更新数据的方法
- VB学习小技巧(一)
- Java 线程池学习
- keepalived+lvs+mysql cluster架构实现负载均衡
- zend studio格式化代码
- ARM中汇编调用c语言
- latex中引用.eps图片遇到的问题