I created and published a feature service from ArcGIS Pro using advanced symbols (multilayer symbols with marker placement). I have two client applications consuming the same feature service:
- iOS client (ArcGIS Maps SDK for Swift): Renders the advanced symbols correctly as expected
- Web client (ArcGIS Maps SDK for JavaScript): Renders only simple symbols, missing the multilayer symbol details
Root Cause:
After investigating the REST endpoint, I discovered that the iOS SDK automatically appends ?returnAdvancedSymbols=true to the service requests, while the JavaScript SDK does not.
Current Workaround:
I can manually set the customParameters property on the layer:
const featureLayer = new FeatureLayer({
url: "https://your-server/arcgis/rest/services/YourService/FeatureServer/6",
customParameters: {
returnAdvancedSymbols: true
}
});https://codepen.io/eirikh/pen/zxrZepo?editors=1010
Questions:
- Why does the JavaScript SDK default to returnAdvancedSymbols=false while the Swift SDK defaults to true?
- Is there a global configuration option to enable advanced symbols by default for all layers in the JavaScript SDK?
- Is this behavior documented anywhere? I couldn't find any mention of returnAdvancedSymbols in the JavaScript SDK documentation.
- Are there performance implications I should be aware of when enabling advanced symbols for web clients?
Any guidance would be appreciated!