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 
Posts: 28
Registered: ‎04-20-2016
Accepted Solution

Clear Query with Button

[ Edited ]



I`ve tried the SDK Fancy Tooltip example but, how do I remove the added query after adding it?


I`ve 2 Buttons with 2 different WFS Queries. 


 analysisId: queryResult.analysisId
 }, function (findAnalysisResult) {
 findAnalysisResult.analysis.getData(function (getDataResult) {

I can remove the pin itselve but the query still remain and I`m not able to add another "Fancy Tooltip" with button 2 to the map.


tried with $GP.queries.clear(); but this did not work. They disappear but the pins from query(button)2 are renderd on the same position as the "old" ones.

I`f i reload after each "press one of the 2 buttons" it works for each one.


kind regards


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

Re: Clear Query with Button

[ Edited ]

Hello Reinhard,


There is not a documented function like $GP.queries.clear(). Did you perhaps mean $


Anyway, the correct way of removing Queries (Analyses) is something like:

        analysisId: /* you must remember the last query ID */
}, function (findAnalysisResult) {
        findAnalysisResult.analysis.remove(); // alt. add callback here




Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Regular Contributor
Posts: 253
Registered: ‎05-01-2016

Re: Clear Query with Button

[ Edited ]

I'm able to remove a query from the map and the legend.  Is there a way to remove its tab from the Data View?