AnsweredAssumed Answered

4.x: Renderer: getSymbol() support dropped?

Question asked by michal.gasparovic@bhp.com_bhp on Sep 11, 2019
Latest reply on Sep 12, 2019 by michal.gasparovic@bhp.com_bhp

Hi,

 

I'd like to know the reason behind dropping the support for the getSymbol() (Renderer | API Reference | ArcGIS API for JavaScript 3.29 )

 

It would be super helpful if we had the API that would retrieve me a symbol from any renderer class for the graphic/feature.

 

Scenario:

Identify/query task can get multiple features for different layers from mapservice(s). I would like to visualize the identified features on the map with their respective symbol from their own renderer. 

So ideally:

1) I would collect the rendering information from all the relevant mapservice layers

2) Instantiate the renderer classes based on the returned json from 1)

3) Perform my identify/query task

4) Get the symbols from for the results in 3) by using the renderer from step 2) via renderer.getSymbol(feature)

5) Provide the array of the features to the Popup via .features property

6) Hook onto the popup's select event and display the feature that is properly symbolized. In addition, I could add another symbol that would mimic the highlight from the mapview's highlightOptions property

 

Currently?

I identify the features, and then symbolize them with the same symbol (based on the geometry type of course).

 

Thanks

Outcomes