AGSMapView endless horizontal scrolling

844
1
Jump to solution
12-07-2016 03:35 AM
AbdelrahmanBadary
New Contributor II

Hello, in version 100 of the ArchGIS iOS SDK is there any way to limit the background grid from scrolling horizontally out of the map bounds, now it scroll endlessly; I have tried limiting the background grid size but it did not work 

    AGSBackgroundGrid * grid = [AGSBackgroundGrid backgroundGridWithColor:[UIColor whiteColor] gridLineColor:[UIColor clearColor] gridLineWidth:0.0f gridSize:100.0f];

    [localMapView setBackgroundGrid:grid];

changing the gird size doesn't have any effect .

Thank you . 

0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor

Hi Abdelrahman,

The `AGSBackgroundGrid` is just for the appearance of the AGSMapView's background only. You cannot limit scrolling of mapView using that. 

The scrolling of mapView is dependant on the map's base layer's spatial reference and `wrapAroundMode`. You can set AGSMapView's `wrapAroundMode` to `AGSWrapAroundModeDisabled` to limit the horizontal scrolling up to base layer's spatial reference horizon. 

Hope this helps!

Regards,

Nimesh

View solution in original post

1 Reply
NimeshJarecha
Esri Regular Contributor

Hi Abdelrahman,

The `AGSBackgroundGrid` is just for the appearance of the AGSMapView's background only. You cannot limit scrolling of mapView using that. 

The scrolling of mapView is dependant on the map's base layer's spatial reference and `wrapAroundMode`. You can set AGSMapView's `wrapAroundMode` to `AGSWrapAroundModeDisabled` to limit the horizontal scrolling up to base layer's spatial reference horizon. 

Hope this helps!

Regards,

Nimesh