AnsweredAssumed Answered

How to zoom to a query result

Question asked by IYTE-ARCHITECTURE on Feb 20, 2016
Latest reply on Mar 28, 2016 by WCrick-esristaff


I'm working on developing an application using ArcGIS Runtime SDK for Android.

I created number of web maps in ArcGIS Online  and the application uses these

web maps as source layers.


When I make a query in map viewer  in ArcGIS Online, the zoom level is changed and  the selected feature(s)

are centered. However, when I try the same thing in my application, the result is not the same.

The following piece of code is written to perform such operation but apparently I missed



mMapView.setOnStatusChangedListener(new OnStatusChangedListener() {

            private static final long serialVersionUID = 1L;


            public void onStatusChanged(Object source, STATUS status) {

                if (source == URL && status == STATUS.LAYER_LOADED) {

                    mMapView.centerAt(1.286389, 103.79, false);

                    mMapView.setScale(1500, false);





It would be great if you could help me on this issue.  Thank you in advance.