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
Staff
Posts: 32
Registered: ‎11-16-2015
Accepted Solution

GeoSpatial Portal auto refresh source

Hi all,

I need to automatically (ok, let say semi automatic, every n seconds) refresh data source in Portal? Do you have any example of script that can do it working?

I will make presentation, and I know that for customer this is main feature to compare with ESRI portal.

TIA

Tomasz

Highlighted
Technical Evangelist
Posts: 1,236
Registered: ‎09-11-2015

Re: GeoSpatial Portal auto refresh source

Cześć Tomasz,

 

What should work is using of $GP.map.refresh(). The bottleneck is that it refreshes all layer and not only a particular layer. To create a loop using JQuery tools should be enough:

 

setInterval(refreshMap, 5000); // refresh each 5000 miliseconds

function refreshMap()
{
   $GP.map.refresh();
}
Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Staff
Posts: 32
Registered: ‎11-16-2015

Re: GeoSpatial Portal auto refresh source

[ Edited ]

Ahoj Jan.

Thanks. It really helped :-)

T.

Highlighted
Contributor
Posts: 38
Registered: ‎04-14-2016

Re: GeoSpatial Portal auto refresh source

Hi Jan,

 

Is there any way to refresh only particular layer on the map, not all layers?

 

Regards,

Mladen