Any ideas for making my labels appear?

2524
5
Jump to solution
10-06-2014 12:52 PM
kingsleyallan
New Contributor II

Labeling in AGOL gives me inconsistent results.  It seems to work with one map service, but not another seemingly identical one. 

Now you see it:

http://bit.ly/1CPxN1s

Now you don't:

Illinois Floodplain Maps - FIRMS

On a seemingly identical application, now you see it:

http://bit.ly/1CPy7gC

Now you correctly STILL see it:

Illinois Floodplain Maps - FIRMS

Granted by the time you read this post all 4 links may be showing labels, but as of writing on 3 do.

0 Kudos
1 Solution

Accepted Solutions
ChrisWhitmore
Esri Regular Contributor

Hi Kingsley,

It looks like the app without the labels is using an older version of the Javascript API:

http://js.arcgis.com/3.7compact/init.js

Illinois Floodplain Maps - FIRMS

It appears to be a custom application, and not the embedded map code generated from the arcgis.com map viewer. The other app you linked to uses the embedded map from the map viewer so it's updated to the latest Javascript API automatically. Labeling was introduced at version 3.10; apps using version 3.7 will ignore any label definitions (as you're seeing).

For the broken app, you can either update the JSAPI references yourself or switch over to use the embedded map code generated from the map viewer (which would handle any subsequent updates to web map functionality).

Note: If you decide to update the JSAPI references yourself, 3.11 is the latest version (matches the recent September ArcGIS Online release). With 3.11, some of the URL paths have changed. Check out ArcGIS API for JavaScript Version 3.11 Released | ArcGIS Blog for more details.

Thanks,

Chris

View solution in original post

0 Kudos
5 Replies
JoeFlannery
Occasional Contributor III

Kingsley:

From your featureclass attribute field, it looks like you are using a Label Expression with the PANEL field for your labels.  Could the Label Expression be hanging things up?  Might you try creating a new "Label" attribute field with "PMR "&[PANEL] and then use that field for your Label property?

Capture.JPG

0 Kudos
kingsleyallan
New Contributor II

Thanks for the suggestion.  I switched the label to a different field with no prefix text, but the result is still the same, it shows in the viewer version, but not in the embedded map.

deleteme.JPG

0 Kudos
JoeFlannery
Occasional Contributor III

Long-shot here...

First, are you using Labeling from within AGOL or are you using labeling in your source ArcMap/map service?  Try serving labels from ArcMap.

Secondly, this is my long-shot:

In ArcMap, go to  >Layer Properties  >Display tab

What field is shown in the >Display Expression >Field drop-down option?

Change it to FIRM_PAN, Save and republish.  Any joy?

Capture.JPG

0 Kudos
ChrisWhitmore
Esri Regular Contributor

Hi Kingsley,

It looks like the app without the labels is using an older version of the Javascript API:

http://js.arcgis.com/3.7compact/init.js

Illinois Floodplain Maps - FIRMS

It appears to be a custom application, and not the embedded map code generated from the arcgis.com map viewer. The other app you linked to uses the embedded map from the map viewer so it's updated to the latest Javascript API automatically. Labeling was introduced at version 3.10; apps using version 3.7 will ignore any label definitions (as you're seeing).

For the broken app, you can either update the JSAPI references yourself or switch over to use the embedded map code generated from the map viewer (which would handle any subsequent updates to web map functionality).

Note: If you decide to update the JSAPI references yourself, 3.11 is the latest version (matches the recent September ArcGIS Online release). With 3.11, some of the URL paths have changed. Check out ArcGIS API for JavaScript Version 3.11 Released | ArcGIS Blog for more details.

Thanks,

Chris

0 Kudos
kingsleyallan
New Contributor II

Wow you nailed it!  Instead of upgrading I just linked to the embedded map viewer for both so it is fixed.  I'll save the upgrade for another day as a simple replacement of two stylesheet links created incompatibility with somewhere else.

0 Kudos