argis for android2.0 GraphicsLayer单击查找对应Graphic信息

本文介绍了如何在ArcGIS for Android 2.0中,当点击GraphicsLayer时找到对应的Graphic并展示其信息。通过对比早期的beta版本,作者指出2.0版本更为稳定且功能更加强大。
摘要由CSDN通过智能技术生成

大家好,今天从两个版本(arcgis for android beta和arcgis for android2.0)写一下arcgis for android的点击GraphicsLayer如何找到已经添加到GraphicsLayer上面对应的Graphic,从而显示出对应Graphic的信息内容,

本人从arcgis for android beta开始学习使用到arcgis for android2.0,经过了1.0,1.1,..等等,目前使用2.0开发,相对来说2.0是比较稳定的,相对比较,两个版本过渡时期去掉了许多功能,新版本相对更加稳定,功能更强大,废话不多说,上代码:


public OnTouchListener onClick() {
		return new OnTouchListener() {
			public boolean onTouch(View v, MotionEvent event) {
				float x = (float) event.getX();
				float y = (float) event.getY();
				Graphic[] gs = photoPointGraphicsLayer.getGraphics(x, y, 20);
				int count = gs.length;
				if (count > 0) {
					picAbsolutePath = "";
					Point p = null;
					try {
						picAbsolutePath = gs[0].getAttributeValue("PATH").toString();
						p = (Point) gs[0].getAttributeValue("POINT");
		
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值