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
Regular Contributor
Posts: 253
Registered: ‎05-01-2016
Accepted Solution

Fancy Tooltips (Part 2)

[ Edited ]

FIGURED IT OUT using 


$GP.queries.find  to find total number of queries...

 

_____________________________________________________________________________________________________________

SOLVED

 

Using the Fancy Tooltips example, if i add a filter so only states with temperature of 60 or higher will be selected and run example, the correct states have pins added. But then if i change the filter to "<" and "AVETEMP", 50, and run the example again, the same result is displayed. What code has to be changed to show the result of a subsequent query?  I am using the exact example except for adding a filter each time before running it again.  If i add the query to the legend, the correct points are displayed after each filter change but the pins never change although they erase before re-drawing.

 

$GP.queries.add({
featureClassId: "{http://www.intergraph.com/geomedia/gml}OM_USA_STATES",
url: "http://demo.hexagongeospatial.com/GWM_WFS_NonTransactional/service.svc/get",
definitionName: "WFS",
queryName: queryName,
addToLegend: false,
filters: [{
operator: ">",
operands: ["AVETEMP", 60],

}]

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

Re: Fancy Tooltips (Part 2)

I see it is 

renderPins(getDataResult.data[0]);

The [0] is the first query, 1 the second, etc.

What is the best way to get the latest query?

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

Re: Fancy Tooltips (Part 2)

Hi Jane,

 

Each time you use $GP.queries.add() you get a generated query object in the callback. So for me the best way would be to save the AnalysisID of this Query into some globally defined variable.

 

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial