1 Reply Latest reply on Jul 16, 2013 9:01 PM by doneill-esristaff

    Reverse Geocode Android

      I am new to ArcGIS and I am working on Geocode and reverse geocode.
      I use the sample project Place Search and i want to add reverse geocode function that after we provide the address, we put a graphic on the layer showing where we are at. When a user tap on the graphic, i want to show the street name of that location by using Toast.makeText, but i am unable to.
      Here is my code:

      private void identityLocation(float x, float y)
        searchFeature(x, y);
        if(identifyGraphic !=null)
         Point mapPoint = mMapView.toMapPoint(x,y);
         Point currentPoint = (Point) GeometryEngine.project(mapPoint, SpatialReference.create(4326), mMapView.getSpatialReference());
         try {
          locRev = locator.reverseGeocode(currentPoint, 2000.0);
          s = locRev.getAddressFields().get("StreetName");    
         } catch (Exception e) {
         Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();   

      Can someone please help. Thank you