how listen map extent change

1147
2
Jump to solution
11-09-2016 06:15 PM
weiliyao
New Contributor II

i want to load point data from database,then add to graphicsLayer. in arcgis for flex,graphicsLayer have extentChangeHandle method,override this method is ok ,but in arcgis android sdk ,how to listen map extent change,and get map extent?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
ShellyGill1
Esri Contributor

I'm afraid there's no equivalent method available on a GraphicsLayer in the Android runtime SDK, so I'd suggest if your code is in control of adding the graphics that change the extent then you should probably get your map extent once you know your additions/changes are complete. 

For generally monitoring the extent changes of a map (e.g. when a user pans or zooms, or when the visible extent is programmatically changed), it is not very simple to monitor this in the current 10.2.8 release. However in the upcoming new release this is made much easier as we've added different listeners for this. For example I you could add a listener that is called whenever navigation is completed (e.g. a user stops panning) - see GeoView| arcgis-android GeoView.addNavigationCompletedListener(NavigationCompletedListener). So if this is a workflow you want, I'd suggest it's definItely worth figuring out if you will be using 10.2.8, or the new release, as that will be out very soon.

Regards

Shelly

View solution in original post

2 Replies
ShellyGill1
Esri Contributor

I'm afraid there's no equivalent method available on a GraphicsLayer in the Android runtime SDK, so I'd suggest if your code is in control of adding the graphics that change the extent then you should probably get your map extent once you know your additions/changes are complete. 

For generally monitoring the extent changes of a map (e.g. when a user pans or zooms, or when the visible extent is programmatically changed), it is not very simple to monitor this in the current 10.2.8 release. However in the upcoming new release this is made much easier as we've added different listeners for this. For example I you could add a listener that is called whenever navigation is completed (e.g. a user stops panning) - see GeoView| arcgis-android GeoView.addNavigationCompletedListener(NavigationCompletedListener). So if this is a workflow you want, I'd suggest it's definItely worth figuring out if you will be using 10.2.8, or the new release, as that will be out very soon.

Regards

Shelly

weiliyao
New Contributor II

thank you very much