Spatial Reference of Null Error

94
1
Jump to solution
01-14-2021 05:51 PM
GarrettRSmith
New Contributor III

Hello

I am working with the QuickReport template. Today I added a Feature Service via the Settings and now when I run the app it will not get past the disclaimer page. I also have a web map that I am using for the Refine Location page with the Feature Service as one of the layers.

I get the following error:

TypeErrror: Cannot read property 'spatialReference' of null

I have included the screen shot of the error and the line(s) of code that the hyperlink links to if you click on it.

I checked the Feature Service and it seems to have a spatial reference. I also copied and pasted the Feature Service layer used in the 311 app demo and it works fine. When I open the two Feature Services side by side in different windows the only difference I see in my metadata compared the file that actually works is that my layer does not have a spatial reference under extent. Could this be the issue?

https://services6.arcgis.com/TRp7qJKKVWTcWaHY/arcgis/rest/services/Arborglyph_Locations/FeatureServe...

If so, how do you add an extent to the layer. I have done it to the Feature Service. 

0 Kudos
1 Solution

Accepted Solutions
GarrettRSmith
New Contributor III

Hello Everyone.

I worked out the problem. I initially uploaded a blank shapefile to ArcGIS Online. After reading some threads about spatial references in the ArcGIS Online community here I found out that there is an issue with uploading blank shapefiles and spatial reference errors. I deleted my Feature Service, added a point to the my blank shapefile in ArcMap, re-uploaded the Feature Service, and now everything works fine. I am able to see the spatial reference of the point layer now. That was a pain. 

View solution in original post

0 Kudos
1 Reply
GarrettRSmith
New Contributor III

Hello Everyone.

I worked out the problem. I initially uploaded a blank shapefile to ArcGIS Online. After reading some threads about spatial references in the ArcGIS Online community here I found out that there is an issue with uploading blank shapefiles and spatial reference errors. I deleted my Feature Service, added a point to the my blank shapefile in ArcMap, re-uploaded the Feature Service, and now everything works fine. I am able to see the spatial reference of the point layer now. That was a pain. 

View solution in original post

0 Kudos