AnsweredAssumed Answered

Problem regarding search coordinates on the map

Question asked by thili@bu on Apr 5, 2015
Latest reply on Apr 14, 2015 by thili@bu

I want to identify the coordinates by tapping  a point on the map.Here is my code snippet.


      mMapView.setOnSingleTapListener(new OnSingleTapListener() {

            private static final long serialVersionUID = 1L;

            public void onSingleTap(float screenX, float screenY) {


                Point mapPoint = mMapView.toMapPoint(screenX, screenY);

               // Point pnt = (Point) GeometryEngine.project(mapPoint, mMapView.getSpatialReference(), SpatialReference.create(4326));

               SimpleMarkerSymbol sms = new SimpleMarkerSymbol(Color.YELLOW,15, SimpleMarkerSymbol.STYLE.X);

               TextSymbol txtSym = new TextSymbol(20, String.valueOf(mapPoint), Color.RED);




                Graphic gMarker = new Graphic(mapPoint, sms);

                Graphic gText = new Graphic(mapPoint, txtSym);

                mLocationLayer2.addGraphics(new Graphic[] { gMarker, gText });




Here when tapped on the map, appears a text symbol with  "Point[m_attributes[8966832.811,663665.135],m_description=com.esri.geometry.VertexDescription@7c5d0f85]"

But only i want to  appear coordinates on the map. So how can i do that?

Please help me on this.. Thank you