AnsweredAssumed Answered

Can't read symbol definition from config.json

Question asked by kganz on Jun 11, 2015
Latest reply on Jun 11, 2015 by kganz

My first attempt at creating a widget for web app builder.

Trying to incorporate a pattern where the symbols are defined and referenced in the config.json file.

I am able to create the in-panel widget, add it to apps and run it using a test config. All is well, interacts with the map after clicking a button.

The problem I am having is referencing to a simple marker symbol defined in the config.json file which looks like this:

config_json.jpg

I can add a graphic to the map at the mouse-click point is I define the symbol in code like this:

    symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_DIAMOND, 10, null, new Color("#ff6666") );

however if I try this:

     symbol = new SimpleMarkerSymbol(this.config.symbols.smsymbol);

I get nothing on the map.

 

Thanks

Outcomes