Hi, Everyone : is there any clicklistener for marker in ArcGis runtime sdk for android,
Thanks for your help, i succeed to do it, using this code :
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-28 17:43 GMT+01:00 Alexander Nohe <geonet@esri.com>:
GeoNet <https://community.esri.com/?et=watches.email.thread>Marker onClickListenerreply 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/624384?et=watches.email.thread#comment-624384>
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/624384?et=watches.email.thread#comment-624384>
//mvHelper.setShowGraphicCallout(false);
2016-07-31 7:29 GMT+01:00 libin qi <geonet@esri.com>:
GeoNet <https://community.esri.com/?et=watches.email.thread>Marker onClickListenerreply from libin qi<https://community.esri.com/people/ymzzx?et=watches.email.thread> in *ArcGISRuntime SDK for Android* - View the full discussion<https://community.esri.com/message/624939?et=watches.email.thread#comment-624939>
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>
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!
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.
Not really, I m using arcGis for the first time, so it s quite difficult to
use it even after reading the api
Le 27 juil. 2016 18:26, "Alexander Nohe" <geonet@esri.com> a écrit :
GeoNet <https://community.esri.com/?et=watches.email.thread>Marker onClickListenerreply 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/623979?et=watches.email.thread#comment-623979>
<https://community.esri.com/message/623979?et=watches.email.thread#comment-623979>
You would query against whatever geometry is showing the marker. This is generally a feature service layer or graphics layer. Do you know what is supporting the underlying geometry of the marker symbol?
Thanks for the feedback, i don't how can i check if there are any markers
there using a query, i wish that u can send me an example of code which
could help me
2016-07-26 15:56 GMT+01:00 Alexander Nohe <geonet@esri.com>:
GeoNet <https://community.esri.com/?et=watches.email.thread>Marker onClickListenerreply 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/623545?et=watches.email.thread#comment-623545>
<https://community.esri.com/message/623545?et=watches.email.thread#comment-623545>
I do not believe that there is a listener for this class (MarkerSymbol | ArcGIS Android 10.2.8 API ).
Instead, I would implement an OnSingleTapListener on the map object and check if there are any markers there using a query. If there are, then handle the OnSingleTap as you wish. ( SingleTapListener )
Is there something special you wanted to do with selecting marker symbols when clicking on the MapView?
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.