[Geomoose-users] Geomoose 3 Custom Service Query

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Geomoose-users] Geomoose 3 Custom Service Query

Reynolds, Michael J. (DOT)
From the doc actions-and-services.md (https://github.com/geomoose/gm3/blob/master/docs/actions-and-services.md) you suggest reviewing src/services/geocode-osm.js for more details which is good!

But I'm not sure how to adjust this example service to do the following:

"Dual Maps Window!"
Wait for user to click a map location (point default).
Plug selection geom coordinates into a url and open a new tab to the url.
Finally, provide some information to the results (super) tab for instance "Success!"

I'm really just stuck on the last step.  In the custom service's runQuery() method do I dispatch a map_query_results and a map_query_finished?

This works but the tab then has the resultsAsHtml value but also has the query results header (layer number, feature number and a zoom to).

There a way I can bypass the map/feature like results?

I guess I was also not sure how to pass the selection object from the query() method over to the runQuery() method but fell back to tucking it into the "this" object as a new property/object.
_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users
Reply | Threaded
Open this post in threaded view
|

Re: [Geomoose-users] Geomoose 3 Custom Service Query

Dan Little-2
Egad! I just looked at the renderQuery() code in serviceManager.jsx. The header is currently not-optional to render.

I have created a PR for allowing the specification of "this.showHeader = false;" in the custom service to hide the summary bit. ( See here: https://github.com/geomoose/gm3/pull/221 )

To get more control over the actual HTML results you'll want to override the resultsAsHtml function.  Checkout src/services/geocode-bing.js for an example of how to do that.

In runQuery(), you get queryId and query as parameter.  "query.selection" will have the GeoJSON object which defines the selection, no need to use "this."

On Tue, Sep 5, 2017 at 2:13 PM, Reynolds, Michael J. (MNIT) <[hidden email]> wrote:
From the doc actions-and-services.md (https://github.com/geomoose/gm3/blob/master/docs/actions-and-services.md) you suggest reviewing src/services/geocode-osm.js for more details which is good!

But I'm not sure how to adjust this example service to do the following:

"Dual Maps Window!"
Wait for user to click a map location (point default).
Plug selection geom coordinates into a url and open a new tab to the url.
Finally, provide some information to the results (super) tab for instance "Success!"

I'm really just stuck on the last step.  In the custom service's runQuery() method do I dispatch a map_query_results and a map_query_finished?

This works but the tab then has the resultsAsHtml value but also has the query results header (layer number, feature number and a zoom to).

There a way I can bypass the map/feature like results?

I guess I was also not sure how to pass the selection object from the query() method over to the runQuery() method but fell back to tucking it into the "this" object as a new property/object.


_______________________________________________
Geomoose-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geomoose-users