Select to view content in your preferred language

Error adding a FeatureLayer

2268
3
02-16-2016 09:51 AM
MikeAnderson
New Contributor II

I'm getting the following error adding a layer to a map. Error: Unsupported value for parameter: multipatchOption.(…)

I'm trying to add a FeatureLayer to a Map that is displayed in a SceneView. The FeatureLayer was published as a featuresever from ArcGIS Pro. I also published a SceneLayer from the same ArcGIS Pro project and that can be added to a map.

The problem I'm trying to solve is to only show some of the features of the scenelayer. There is no query on SceneLayer, that's why I tried adding the FeatureLayer.

Oddly the error does not come after adding the FeatureLayer, that promise comes back resolved. It fails somewhere in the init.js script. I expeced to see building exteriors after adding this layer, but all I get is the error above.

Here is a short jsFiddle that illustrates the error: Add a FeatureLayer - JSFiddle

Tags (1)
0 Kudos
3 Replies
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Mike,

I swap a featurelayer and point to one from Esri sample 3D symbols for points | ArcGIS API for JavaScript and the layer can load on map:

Layer: Counties (ID: 3)

I do notice that your original feature layer's geometry type is:  esriGeometryMultiPatch, so far I didn't see this type of geometry in JavaScript type. I tried other services with "esriGeometryPoint", "esriGeometryPolygon" or "esriGeometryPolyline" are all works fine.

And I do notice that you have a SceneServer for that particular service, so I would recommend to use as SceneServer to view rather than featureLayer.

You can reference with this sample: ArcGIS API for JavaScript Sandbox

MikeAnderson
New Contributor II

Thanks Yue,

I understand I can use a SceneServer. In fact I do have a "Add Scene Layer" button in the jsFiddle referenced above.

The problem I'm trying to solve is to only show some of the features of the scenelayer. For instance, just show the "Atwood Center" building. Ther doesn't seem to be a way to query on SceneLayer, that's why I tried adding the FeatureLayer. If you know of another way I can filter out esriGeometryMultiPatch geometries from a SceneLayer or FeatureLayer, or perhaps draw those geometries in a graphics layer that would be really helpful.

0 Kudos
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Mike,

I think that's a good suggestion if SceneServer can have query operation or if it is possible that allow esriGeometryMultiPatch to support show in featureLayer.

Currently for this beta version I suspect that's a limitation. I assume that's why you see the error message Error: Unsupported value for parameter: multipatchOption.(…)

0 Kudos