PROBLEM

Layers in a map service full extent display as NaN

Last Published: April 25, 2020

Description

Published map services result in NaN, 'Not a Number' as the FullExtent property. For example, the initial full extent is as follows:

XMin: -1.2517040322409505E7
YMin: 3946983.752765715
XMax: -1.2444192662924586E7
YMax: 3999198.926415506
Spatial Reference: 102100 (3857)
And the resulting full extent after publishing is displayed as follows:
XMin: NaN
YMin: NaN
XMax: NaN
YMax: NaN
Spatial Reference: 102100 (3857)

Cause

The issue is caused by corrupted data or an incomplete publishing process.

Solution or Workaround

Use one of the following workaround to resolve the issue:

  1. Export the data to shapefile. For more information, refer to the following web help document, ArcMap: Exporting features.
  2. Copy the exported shapefile and paste it in the enterprise geodatabase through the Catalog pane.
  3. Register the enterprise geodatabase with ArcGIS Server. For more information, refer to the following web help document, ArcGIS Server: Register your data with ArcGIS Server using ArcGIS for Desktop.
  4. Publish a new map service to ArcGIS Server. The following web help document, ArcGIS Server: Publish a map service from ArcMap describes how to do so.
  • Alternatively, if the map service is consumed through ArcGIS Runtime SDK for .NET, the full extent can be extracted using the following script:
var table = await ShapefileTable.OpenAsync(@"C:\Users\jenn6286\Downloads\states_21basic\states.shp");

var features = await table.QueryAsync(new QueryFilter(){WhereClause= "1=1"});
if (features != null)
{
	Envelope fullExtent = GeometryEngine.Union(from f in features where f.Geometry != null select f.Geometry).Extent;
}

Article ID:000018637

Software:
  • ArcGIS Runtime SDK for NET 10 2 7
  • ArcGIS Web AppBuilder
  • ArcGIS Server
  • ArcGIS Runtime SDK for NET 100 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic