Reinitialize/Reload GisViewer

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
Romero
Posts:27
Joined: Wed Jul 19, 2017 9:24 am

Reinitialize/Reload GisViewer

Post by Romero »

I have a GisViewer in which event 'Initialize', it loads some shapefiles then color and so. After that, checks how many DP's with a certain name are, and based on some DPE's (coordinates) of them, uses the addSymbol() to introduce the reference object i desire in a new empty layer i created before this checkup.

Client is able to create a new DP's which refers to a new point/symbol on the map. However, since the gis 'draws' the ref objects on the initialize, it won't show up the added object until restart the gis, in this case, the app.

I wonder if there is a way to reinitialize the GisViewer or reaload the layer maybe (if it could) because in my opinion it is the easiest way to solve the problem. There is a lot of dollar parameters going from this object and panel to others and it would take some time to adapt everythink but i know there are better approaches so i will be thankful for any suggestions.

Thank you for your time.
Agustín Romero.

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Reinitialize/Reload GisViewer

Post by Gertjan van Schijndel »

The only way I can think of the reinitialize the gis viewer is to reopen the same panel with a different name.

But I prefer to use a dpQueryConnectSingle to get a callback from the new datapoints with the coordinates and add the new objects on the map.

Romero
Posts:27
Joined: Wed Jul 19, 2017 9:24 am

Re: Reinitialize/Reload GisViewer

Post by Romero »

Thank you Gertjan for your advice.

After trying the deleteAll() function and then loading everything again resulted on the last objects didn't disappear and just standing still.
I ended up adding the new objects on the go with the same script as i do on the Gis at first like you suggested but without using the dpQueryConnectSingle() (because i'm not using the database for any of the values and i don't know what to do with the query).
After some noobie errors it's working all fine.

Best Regards,
Agustín Romero.

3 posts • Page 1 of 1