3D Labels in 4.2 not working?

1381
4
Jump to solution
01-24-2017 05:18 AM
DavidChrest
Occasional Contributor II

I would like to get 3D labels to appear from my FeatureLayers just like what is shown on the image of County labels here: LabelSymbol3D | API Reference | ArcGIS API for JavaScript 4.2 . The code snipped looks easy enough but does not seem to work for me an no labels appear. A sample link is listed in the page above but no 3D labels appear there as well and that sample has the same code snippet: Flat vs. volumetric 3D symbol layers | ArcGIS API for JavaScript 4.2 . Is there code missing to get these 3D labels to appear for you FeatureLayer?

0 Kudos
1 Solution

Accepted Solutions
FC_Basson
MVP Regular Contributor

I've tested the Sandbox code with my own layers and it works - the source layer must originate from a HTTPS resource though.

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

David,

  The 3D labels appear fine for me when using the Flat vs. volumetric 3D symbol layers | ArcGIS API for JavaScript 4.2 sample. It may be a browser issue on your end.

0 Kudos
FC_Basson
MVP Regular Contributor

I've tested the Sandbox code with my own layers and it works - the source layer must originate from a HTTPS resource though.

0 Kudos
DavidChrest
Occasional Contributor II

Ah yes, I see those 3D labels in the sample now. I must have been seeing things, I'm getting old. My source layer came from HTTP instead of HTTPS which was the problem. I do happen to have this Feature layer on HTTPS in a different server so that should do the trick. Didn't see this important detail in the documentation so much thanks for this tip. Wonder why you have to have HTTPS for labels? I don't need it for other 3D symbols of the FeatureLayer such as points.

0 Kudos
FC_Basson
MVP Regular Contributor

The HTTP resource is considered insecure.  Here is the message from the browser console when loading a service from a HTTP source.

The page at 'https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=symbols-points...' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://myserver/arcgis/rest/info?f=json'. This request has been blocked; the content must be served over HTTPS.

0 Kudos