Select to view content in your preferred language

Is SDK v200.x able to set minScale and max Scale?

643
1
Jump to solution
10-09-2023 10:19 PM
trieunguyenaxon
Occasional Contributor

Is there any way to config Map minScale and maxScale in ArcGIS SDK v200.x like v100.x

 

 

private var portal: AGSPortal?
private var map: AGSMap?

map.maxScale = MapConst.maxScale
map.minScale = MapConst.minScale

 

 

I can not find those APIs on the new SDK version v200.2

0 Kudos
1 Solution

Accepted Solutions
rolson_esri
Deactivated User

The types are no longer prefixed with "AGS" in the Swift version. It's a new API, not an exact port of the objective-c based API.

This works:

 

        var portal: Portal?

        var map: Map?

        map?.minScale = myMinScale

        map?.maxScale = myMaxScale

 

Here is a migration guide from 100.x to 200.x:

https://developers.arcgis.com/swift/reference/migrate-from-100-x-to-200-x/

 

Some blog posts you might be interested in:

https://developers.arcgis.com/swift/release-notes/prior-releases/release-notes-for-200-1/

https://www.esri.com/arcgis-blog/products/developers/announcements/whats-new-in-arcgis-maps-sdks-for...

 

View solution in original post

1 Reply
rolson_esri
Deactivated User

The types are no longer prefixed with "AGS" in the Swift version. It's a new API, not an exact port of the objective-c based API.

This works:

 

        var portal: Portal?

        var map: Map?

        map?.minScale = myMinScale

        map?.maxScale = myMaxScale

 

Here is a migration guide from 100.x to 200.x:

https://developers.arcgis.com/swift/reference/migrate-from-100-x-to-200-x/

 

Some blog posts you might be interested in:

https://developers.arcgis.com/swift/release-notes/prior-releases/release-notes-for-200-1/

https://www.esri.com/arcgis-blog/products/developers/announcements/whats-new-in-arcgis-maps-sdks-for...