Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Contributor
Posts: 63
Registered: ‎02-22-2016

FormMap > layers="{FORM.DYNAMIC_VALUE}", doesn't reload Map properly

[ Edited ]

I have a form map defined as follows

<FormMap name="MyMap" ... layers="{FORM.SELECTED_LAYERS}" template="MapBigTemplate"/>

The value FORM.SELECTED_LAYERS is handled using Script and Session variables. It is defined as follows.

<FormField name="SELECTED_LEGEND" ... type="combobox" ... />
<FormField name="SELECTED_LAYERS" ... defaultvalue="{SESSION.WF_SPD.MAINMAP_LAYERS}" />

When the user selects a Legend (Combobox), the value of the selected layers (Eg. "101,102,311,412") gets updated. This should update the FormMap, which is not happening properly.

 

Not happening properly means:

 

I have a Telerik Report with this map as image in it. The Report's PDF shows image with the changes applied, but the interface's FormMap doesn't update the change. I may have to go back and forth between FormTabs for changes to reflect in FormMap.

Highlighted
Staff
Posts: 1,065
Registered: ‎10-18-2015

Re: FormMap > layers="{FORM.DYNAMIC_VALUE}", doesn't reload Map properly

Hi Vipanth,

 

you may have to force the reload of the formmap. Can you please try to subscribe to the event and then reload the field? Something like:

 

function refreshMap() {
	IG.getItemById(MyMap).reload();
}

IG.getItemById('SELECTED_LAYERS').value.subscribe(refreshMap);

Please consider it as pseudo code, I did not test it...

 

Regards,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Highlighted
Contributor
Posts: 63
Registered: ‎02-22-2016

Re: FormMap > layers="{FORM.DYNAMIC_VALUE}", doesn't reload Map properly

Hi Stefano,

 

Tried the piece of code. Now, when the value of selected layers change the FormMap doesn't appear at all.

(GMSC Ver. 15.0.1)

 

Thanks,

Vipanth