Select to view content in your preferred language

Add Data widget shape file won't display when basemap and shape file have same coordinate system

671
3
06-24-2024 06:30 AM
Labels (1)
ColForbin
Frequent Contributor

I have an out-of-the-box Web AppBuilder app in Portal (Enterprise 11.2) with a web map with no layers except for a custom basemap that is using spatial reference 2150 (2958).  I created a shape file in ArcGIS Pro 3.3 with the same coordinate system and one polygon feature.  With the add data widget in WAB, when I select the shape file, it seems to be added to the app, but the features on the map do not display.  There are no errors and the same thing happens with Chrome and Firefox browsers.  If I open the table widget, I can see the records of the shape file, but only when the "Filter by map extent" button is off.  If I zoom to the the shape file in the app, the map zooms to the right geographic extent of the shape file but still not features show up on the map.

In the Chrome dev tools Console tab I saw this message:
Map: Geometry (wkid: 102100) cannot be converted to spatial reference of the map (wkid: 2150)

So this is implying that the shape file is using web mercator (102100/3857), but I have confirmed the prj of the shape file is 2150 (2958).  For some reason the widget is not recognizing the projection of the shape file.

If I then go and change the web map to use an Esri basemap with the standard web mercator projection (3857), then try the add data widget, the shape file features show up in the map as expected.

Any thoughts on what is going on here?

0 Kudos
3 Replies
KristjanHlynurIngolfsson
Occasional Contributor

Same thing here, any progress on this?

0 Kudos
ColForbin
Frequent Contributor

@KristjanHlynurIngolfsson yes!  From support:

"Starting ArcGIS Enterprise version 11.2, the spatial reference of the added shapefile is converted during the addition to Mercator (wkid: 3857).  This causes the features to not be visible because the documentation of the Add Data widget states that "If you add a layer that has a spatial reference different from that of your basemap, especially the tile layers, the added layer might not be visible.". In this case the layer added is in a spatial reference identical to the basemap but gets converted to Mercator when added.  To work around the issue, you can migrate your app to ArcGIS Experience Builder as recommended by Esri. I tested the behavior in ArcGIS Experience Builder using the Add Data widget and your custom basemap. After adding the shapefile, the feature loads as expected when added to the map although the spatial reference reference is converted to Mercator."

 

Our workaround was to use a base map in web mercator and that seemed to solve the issue.  Using Experience Builder instead is also an option.

 

0 Kudos
MattiasEkström
Frequent Contributor

I recently ran into this problem too. A few weeks ago we updated our ArcGIS Enterprise from 10.9.1 to 11.3, so I assume that's the reason. Using a web mercator basemap or migrating to Experince Builder is not a short-term option for us. In the long term, we will migrate to Experience builder, but I need a quicker solution to this Add data widget problem in WAB.

Anyone know if it's possible to make changes to the widget source code to fix this?

WAB is a part of Enterprise 11.3, so I was expecting WAB and all of its OOTB Widgets would work after an upgrade to 11.3.