概述
@Override
public void addMapViewClickLisenter() {
mMapView.setOnTouchListener(new DefaultMapViewOnTouchListener(this, mMapView) {
@Override
public boolean onSingleTapUp(MotionEvent e) {
ISQS = false;
ISBJ = false;
ISXZ = false;
// if (CLICKABLE) {
final android.graphics.Point point11 = new android.graphics.Point(Math.round(e.getX()), Math.round(e.getY()));
final Point center = mMapView.screenToLocation(point11);
if (center == null) {
return super.onSingleTapUp(e);
}
final ListenableFuture<List<IdentifyLayerResult>> listListenableFuture = mMapView.identifyLayersAsync(point11, 0, false, 5);
listListenableFuture.addDoneListener(new Runnable() {
@Override
public void run() {
try {
List<IdentifyLayerResult> identifyLayerResults = listListenableFuture.get();
int i = 0;
int d=identifyLayerResults.size();
if(d==1){
mBoolean=false;
for (IdentifyLayerResult identifyLayerResult : identifyLayerResults) {
SimpleLineSymbol simpleLineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.SOLID, Color.YELLOW, 1);
SimpleFillSymbol simpleFillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, Color.YELLOW, simpleLineSymbol);
Geometry geometry;
for (final GeoElement geoElement : identifyLayerResult.getElements()) {
attributes = geoElement.getAttributes();
最后
以上就是活泼老鼠为你收集整理的arcgis for android MapView点击事件查询的全部内容,希望文章能够帮你解决arcgis for android MapView点击事件查询所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复