Select to view content in your preferred language

Turning on Labels breaks Symbology

558
7
Jump to solution
02-13-2024 05:51 AM
MarcRabideau
Emerging Contributor

I am having an issue where I am using a hosted feature layer to create a Web Map, which in turn is being used in a Web Mapping Application on ArcGIS Online.  I have a model that runs nightly to update my data which is working fine.  However, the problem is that when I label the features(points) in my web map, the symbology disappears from my application.  My current fix for this is to rebuild the spatial index of the hosted feature layer, which makes the symbology show up again.  Is there something I can do to prevent this from happening? Has anyone experienced something like this before?

0 Kudos
1 Solution

Accepted Solutions
RussRoberts
Esri Notable Contributor

It looks like when you are updating the service the layers extent is getting set to null

 "useStandardizedQueries" : true, 
  "geometryType" : "esriGeometryPoint", 
  "minScale" : 0, 
  "maxScale" : 0, 
  "extent" : null, 

the layer throws an error when querying in 3.x

RussRoberts_2-1707920422882.png

Rebuilding the index is probably fixing that null layer extent which the 3.x JSAPI (Map Viewer Classic, Web AppBuilder)  is needing to draw the features. 

Another thing I noticed

The labels also use a scale range which is not supported in WAB apps and other 3.x JSAPI apps like Map Viewer Classic and would recommend migrating to Experience Builder or Instant apps so you can take advantage of this plus additional web map enhancements we have made and WAB is on retirement roadmap.

View solution in original post

0 Kudos
7 Replies
RussRoberts
Esri Notable Contributor

Can you share the web map and layer when it is this state and I can take a look.

0 Kudos
MarcRabideau
Emerging Contributor

Layer - WaterServices_Prod - Overview (arcgis.com)

Map - Get The Lead Out Prod - Overview (arcgis.com)

App - Get The Lead Out App - Overview (arcgis.com)

 

Its currently fixed but will run again at 1am tomorrow morning and be broken again.

0 Kudos
MarcRabideau
Emerging Contributor

Thank you, It is currently in the "Broken" state

0 Kudos
RussRoberts
Esri Notable Contributor

thanks taking a look

0 Kudos
RussRoberts
Esri Notable Contributor

It looks like when you are updating the service the layers extent is getting set to null

 "useStandardizedQueries" : true, 
  "geometryType" : "esriGeometryPoint", 
  "minScale" : 0, 
  "maxScale" : 0, 
  "extent" : null, 

the layer throws an error when querying in 3.x

RussRoberts_2-1707920422882.png

Rebuilding the index is probably fixing that null layer extent which the 3.x JSAPI (Map Viewer Classic, Web AppBuilder)  is needing to draw the features. 

Another thing I noticed

The labels also use a scale range which is not supported in WAB apps and other 3.x JSAPI apps like Map Viewer Classic and would recommend migrating to Experience Builder or Instant apps so you can take advantage of this plus additional web map enhancements we have made and WAB is on retirement roadmap.

0 Kudos
MarcRabideau
Emerging Contributor

Thank you for the quick reply, opening it in experience builder did seem to fix the issue. 

Do you have any recommendation for getting it to work in WAB? 

This is a public facing map that has taken a while to get exactly how my team wants it, and trying to replicate it exactly is going to be a pain.

0 Kudos
RussRoberts
Esri Notable Contributor

I think you will have to see where in the model the layer extent is getting set to null which would solve the display issue. 

For migrating to ExB you would use the same web map as the data source and then configure the panels/tools you need in the app to mirror what you are using in the WAB version. 

0 Kudos