Bookmark in sdk for android

3988
6
03-17-2015 01:12 AM
AbdulFatah
New Contributor III

Does anybody knows how to make a bookmark using arcgis sdk for android ?

I already read the API reference but it doesn't pretty clear for me.

0 Kudos
6 Replies
omega_cancer
Occasional Contributor II

Bookmarking a point is just saving lat/lon and displaying it in a list to user. Use Zoom method of MapView to zoom on a selected bookmark.

0 Kudos
AbdulFatah
New Contributor III

Thank you for your response Abdul Razal,

I still wondering how to get the current extent and zoom level. Is it possible using like this :

    

   Envelope rExtent=new Envelope();
   map.getExtent().queryEnvelope(rExtent);
   double leftB_x=rExtent.getXMin();
   double leftB_y=rExtent.getYMin();
   double topR_x=rExtent.getXMax();
   double topR_y=rExtent.getYMax();
0 Kudos
omega_cancer
Occasional Contributor II

Can you please try:

to Get full Extent of Layer

yourLayer.getFullExtent();

to Get Extent of Layer

yourLayer.getExtent();

0 Kudos
AbdulFatah
New Contributor III

Thank you, Abdul. I ever used it before, the result was not my expected. I just need to get the center coordinate or extent of the map current extent.

Regarding list of bookmark, I already used it in my application using like this :

                        double lat = -7.2742175;

                        double lon = 112.719087;

                        map.centerAndZoom(lat, lon, 10);

I need have additional function to add a new bokmark by getting a map current extent, but I can't do that.

0 Kudos
omega_cancer
Occasional Contributor II

mMapView.getCenter();

0 Kudos
AbdulFatah
New Contributor III

Hi Razak,

Sorry for long reply, Basically what I want is try to create Bookmark using Bookmark method in arcgis sdk for android. Do you have any example about that ?

Thanks a lot for your response

0 Kudos