Marker onClickListener

6457
14
Jump to solution
07-26-2016 07:20 AM
MohamedEzzerI
New Contributor III

Hi, Everyone : is there any clicklistener for marker in ArcGis runtime sdk for android,

0 Kudos
14 Replies
MohamedEzzerI
New Contributor III

at this moment, it resolve my probleme, thanks for your help

Le 28 juil. 2016 21:50, "Alexander Nohe" <geonet@esri.com> a écrit :

GeoNet <https://community.esri.com/?et=watches.email.thread>

Marker onClickListener

reply from Alexander Nohe

<https://community.esri.com/people/ANohe-esristaff?et=watches.email.thread>

in ArcGIS Runtime SDK for Android - View the full discussion

<https://community.esri.com/message/624502?et=watches.email.thread#comment-624502>

0 Kudos
MohamedEzzerI
New Contributor III

Thx Eric,

for the moment the code do the job, i need one more thing, i need to create

polygons usings mapViewHelper cuz the standard method does not allow me to

set a title and a subtitle to the polygon

Le 30 juil. 2016 20:02, "Eric Bader" <geonet@esri.com> a écrit :

GeoNet <https://community.esri.com/?et=watches.email.outcome>

Marker onClickListener

Eric Bader

<https://community.esri.com/people/ebader-esristaff?et=watches.email.outcome>

marked Alexander Nohe

<https://community.esri.com/people/ANohe-esristaff?et=watches.email.outcome>'s

reply on Marker onClickListener

<https://community.esri.com/thread/180462?et=watches.email.outcome> as

helpful. View the full reply

<https://community.esri.com/message/624502?et=watches.email.outcome#comment-624502>

0 Kudos
libinqi
New Contributor

Actually, I want to realize a function like this, when you click a marker in your map, the map will show some information about your marker such as a toast in android. So can you give me some advice? Thx a lot!

0 Kudos
MohamedEzzerI
New Contributor III

public void markerClick() {

mvHelper.setOnGraphicClickListener(new OnGraphicClickListener() {

@Override

public void onGraphicClick(Graphic graphic) {

double gX, gY;

//mvHelper.setShowGraphicCallout(false);

gX = ((Point)graphic.getGeometry()).getX();

gY = ((Point)graphic.getGeometry()).getY();

Point p = new Point(gX, gY);

Point newPoint =

(Point) GeometryEngine.project(p,

arcMap.getSpatialReference(), SpatialReference.create(4326));

Toast.makeText(ctx, String.valueOf(newPoint.getX()) + " "

+ String.valueOf(newPoint.getY()), Toast.LENGTH_LONG).show();

}

});

}

2016-07-31 7:29 GMT+01:00 libin qi <geonet@esri.com>:

GeoNet <https://community.esri.com/?et=watches.email.thread>

Marker onClickListener

reply from libin qi

<https://community.esri.com/people/ymzzx?et=watches.email.thread> in *ArcGIS

Runtime SDK for Android* - View the full discussion

<https://community.esri.com/message/624939?et=watches.email.thread#comment-624939>

libinqi
New Contributor

Hey, my bro, could you please show me the complete code about the marker onClikListener or send me a demo about it . Thanks a lot! My email address is cnugis@outlook.com.

0 Kudos