[Geomoose-users] Geomoose 3 Custom Service Query

Dan Little theduckylittle at gmail.com
Wed Sep 6 06:07:44 PDT 2017


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) <
mike.reynolds at state.mn.us> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20170906/5d914f37/attachment-0001.html>


More information about the Geomoose-users mailing list