PROBLEM
The OfflineMapAreaManager object and the REST API, CreateMapArea, take a feature’s geometry as an input parameter to create a map area for offline use. However there is a limitation in the “character size” of the geometry, with a max amount of 100,000, and this limitation applies regardless of how CreateMapArea is called (from Python, a REST Endpoint or the Manage Area UI).
If this limit is exceeded, when you run code in the ArcGIS API for Python similar to the following:
Example:
WebMap.offline_areas.create(area=Louisiana State Boundary Polygon) create(area, item_properties=None, folder=None, min_scale=None, max_scale=None, layers_to_ignore=None, refresh_schedule='Never', refresh_rates=None, enable_updates=False, ignore_layers=None, tile_services=None, future=False)
Errors similar to the following may be received:
Error: {"code": 24, "messageCode": "OffPkg_ 24", "message": "Parameter area is invalid or exceeded limit.", "params": {"name": "area"}}
This can happen when the polygon used to generate the offline area has too many characters. This is generally seen with polygon features where there are a large number of vertices, which can increase the character size of the geometry.
Example:
{ "spatialReference" : {"latestWkid":3857, "wkid":102100}, "rings" : [[[-1091028.5893342558,5441435.281784553], [-155031.7985004736,5428390.228011981], [480924.27683202364,5118565.274308054], [-1009495.8089271132,4365202.923529557], [-1123641.8209299697,4733730.514956484], [-1091028.5893342558,5441435.281784553]]] }
Aim to reduce the vertices of the polygon by smoothing out the feature so that the character count limit is not reached. Since the limit is already set high with a value of 100,000, it would be difficult to increase this count or submit an enhancement, as this may involve quality issues. A polygon having a larger amount of characters put into the JSON for processing would mean it would take a much more time to process a single polygon. This might affect the overall performance of the feature layer itself, depending on the number of polygons used.
Thus, it is recommended to limit the number of vertices of a polygon, which is made up of characters, so that it doesn't go over the limit.
Article ID: 000032235
Get help from ArcGIS experts
Download the Esri Support App