- 浏览: 250447 次
- 性别:
- 来自: 济南
文章分类
- 全部博客 (303)
- c (31)
- c++ (16)
- java (18)
- c# (1)
- python (3)
- java web (6)
- oracle (7)
- sqlserver (2)
- mysql (2)
- android (24)
- android系统 (15)
- android多媒体部分 (15)
- android游戏 (12)
- linux (26)
- javaScript (1)
- ajax (1)
- node JS (2)
- html (5)
- apache (3)
- jboss (1)
- weblogic (0)
- 通信协议 (10)
- 云计算 (1)
- 分布式 (5)
- ejb (1)
- webservice (5)
- 设计模式 (16)
- JNI (6)
- swing (13)
- 版本控制 (1)
- UML (1)
- xml (4)
- spring (5)
- hibernate (5)
- struts1 (3)
- struts2 (4)
- ibatis (0)
- tomcat (2)
- 心得体会 (1)
- css (1)
- 嵌入式 (41)
- arm体系结构 (10)
动态操作地图服务
1.动态添加一个地图服务
String url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer";
ArcGISDynamicMapServiceLayer arcGISDynamicMapServiceLayer=new ArcGISDynamicMapServiceLayer(HelloWorld.this,HelloWorld.this.url);
map.addLayer(arcGISDynamicMapServiceLayer);
2.移除地图服务
map.removeLayer();
reorderLayer();
导航与触屏操作
1.放大
map.zoomin();
2.缩小
map.zoomout();
3.取得当前长按位置坐标
this.map.setOnLongPressListener(new OnLongPressListener(){
@Override
public void onLongPress(float x, float y) {
Point point=HelloWorld.this.map.toMapPoint(x,y);
showStation.setText("X:"+point.getX()+"Y:"+point.getY());
}
});
4.mapView的事件
OnLongPressListener 在MapView 上长按时
OnMapExtentChangedListener MapView 的地图范围改变时
OnPanListener 在MapView 中拖劢地图时
OnPinchListener 在MapView 上两指缩放操作时
OnSingleTapListener 在MapView 上单击时
OnStatusChangedListener 在MapView 的状态改变,比如被创建戒刜始化时
OnZoomListener 在MapView 被缩放时
MapOnTouchListener 在MapView 上按住并移劢(类似绘图操作)时
用户要素
1.添加用户要素
graphicsLayer=(GraphicsLayer) findViewById(R.id.glayer);
graphicsLayer.setRenderer(new SimpleRenderer(new SimpleMarkerSymbol(Color.RED,20,STYLE.SQUARE)));
Graphic graphic=new Graphic();
graphic.setGeometry(HelloWorld.this.map.getCenter());
graphicsLayer.addGraphic(graphic);
graphicsLayer.postInvalidate();
2.添加用户要素使用指定图片
Drawable drawable=this.getBaseContext().getResources().getDrawable(R.drawable.icon);
graphicsLayer.setRenderer(new SimpleRenderer(new PictureMarkerSymbol(drawable)));
Graphic graphic=new Graphic();
graphic.setGeometry(HelloWorld.this.map.getCenter());
graphicsLayer.addGraphic(graphic);
graphicsLayer.postInvalidate();
3.分类渲染或是唯一值渲染
graphicsLayer=(GraphicsLayer) findViewById(R.id.glayer);
//分类渲染或是唯一值渲染
ClassBreaksRenderer breaksRenderer=new ClassBreaksRenderer();
breaksRenderer.setField("class");
breaksRenderer.setMinValue(0);
ClassBreak cb1=new ClassBreak();
cb1.setClassMaxValue(0.5);
cb1.setSymbol(new SimpleMarkerSymbol(Color.RED,20,SimpleMarkerSymbol.STYLE.CIRCLE));
breaksRenderer.addClassBreak(cb1);
ClassBreak cb2=new ClassBreak();
cb1.setClassMaxValue(1);
cb1.setSymbol(new SimpleMarkerSymbol(Color.GREEN,20,SimpleMarkerSymbol.STYLE.CIRCLE));
breaksRenderer.addClassBreak(cb2);
graphicsLayer.setRenderer(breaksRenderer);
//添加用户要素
Graphic graphic=new Graphic();
//分类渲染或是唯一值渲染时使用
graphic.setAttributeValue("class", Math.random());
graphic.setGeometry(HelloWorld.this.map.getCenter());
graphicsLayer.addGraphic(graphic);
graphicsLayer.postInvalidate();
通过交互绘制几何图相
查询与实别
发表评论
-
NDK环境搭建学习笔记
2013-05-12 13:39 1076本地native方法实现步骤 ... -
即时通信学习笔记
2013-05-18 09:56 785下载安装文件 openfire_3_6_4.exe spark ... -
android 代码混淆
2013-03-20 19:47 1009在项目文件下,自动生成了文件:proguard-projec ... -
android 即时通信学习笔记一
2012-11-04 15:49 760下载安装文件 openfire_3_6_4.exe spa ... -
andriod 源码下载
2012-11-02 14:36 827git 是版本控制工具 安装方法: sudo apt-g ... -
android应用的适配常用方法
2012-09-03 14:48 387屏幕大小: small normal large ... -
android 蓝牙学习笔记
2012-09-07 09:56 814蓝牙部分学习 蓝牙之间的通信需要四部分: 1 设置蓝牙设备 ... -
取得手机 IP地址
2012-09-07 09:57 607public String getLocalIpAddress ... -
android动画Scale+Translate
2012-09-07 10:14 705/** * 移动缩小动画 * @author 岳振华 * ... -
android中ActionBar +Fragment
2012-09-07 10:18 1058/** * 测试tab标题栏 * * @time 下午0 ... -
android 启动流程
2012-09-10 15:45 643bootload 加载linux 内核 挂载ramd ... -
android 修改开机动画
2012-09-10 16:41 866framebuffer驱动里可以定制开机界面 开机过程中屏 ... -
Framebuffer Driver
2012-09-10 16:42 649Framebuffer Driver 中 ... -
android 简单服务实现
2012-09-14 16:06 645/** * 测试服务 * * @time 下午02:40 ... -
android 常用命令
2012-09-26 16:03 6681 显示设备列表 adb devices 2 在指定模拟器 ... -
android 调用webservice
2012-10-13 22:43 864web服务端 package cn.yue.lsp.ph ... -
android handler和looper
2012-10-25 16:58 6721 消息在主线程执行 handler = new Handl ... -
android 动画
2012-10-25 17:05 635tween xml 代码如下: <?xm ... -
NDK学习笔记
2012-10-27 15:40 673工具下载: cygwin 1.7或以上版本 awk升级 ... -
android activity四种加载模式
2012-10-27 15:45 771Activity之间的跳转,或 ...
相关推荐
_ARCGIS学习笔记(纸老虎
ArcGIS学习笔记
初步学习ArcGIS的
arcgis engine
Arcgis 学习笔记 很详细 对你一定有帮助
ArcGIS SDK——Android v10.2.9~v100.1.0官方开发包,附带pdf文档说明,详细实用
Arcgis For Android 手动打点、自动轨迹测量距离、面积
ArcGIS for Android实现定位、放大缩小功能
ArcGIS for Android 获取FeatureLayer的图例
android arcgis featureLayer查询
Android ArcGIS 部分中文核心说明文档
arcgis pro深度学习库arcgis pro深度学习库arcgis pro深度学习库arcgis pro深度学习库arcgis pro深度学习库arcgis pro深度学习库arcgis pro深度学习库arcgis pro深度学习库arcgis pro深度学习库arcgis pro深度学习库...
arcgis android api文档
arcgis for android通用终端采集项目
ArcGIS客户端开发学习笔记——XML学习
arcgis for android,包括arcgis在安卓上开发所依赖的jar包以及api文档
这是arcgis 10的android demo可以借鉴很多图层,兴趣点,合并,之类的代码
Arcgis server 9.2 的simple arcgis server view sample学习笔记
ArcGIS+for+Android 开发教程基础版 需要进行Android arcgis地图开发的朋友,可以下载学习下