Zum Hauptinhalt gehen

Query a layer in GVH

Kommentare

5 Kommentare

  • Stefan Schweigert

    Hi Berend,

     

    Depending on the configuration of your map service, you may need to enter these settings slightly differently; see https://docs.geocortex.com/workflow/latest/help/Default.htm#wf5/help/activities/get-layer.htm

     

    Thanks, Stefan

    0
  • Berend Veldkamp

    @Nico Burgerhart? That particular sample just shows information about a mapservice, it doesn't do anything with a single layer

    0
  • Berend Veldkamp

    @Stefan Schweigert? I read that page, and it basically describes what I already do, i.e. use the Mapservice ID as Layer ID, and the Layer ID as Sublayer ID. This mapservice is added to the site as a run-of-the-mill MapServer. It has more than one layer.

     

    When I load the viewer with debug=true in the URL, I can see that the outputs of Get Layer are:

    • layer: This seems to be the mapservice, the ID is the one I entered for layer, and its url property ends in .../MapServer?token=blah
    • sublayer: The actual layer, its ID is the same as the one I entered for sublayer. The type is returned as Feature Layer

     

     

    0
  • Jostein Svegården

    I wish there was a more elegant way to query a particular layer in a map service with several layers, i.e. get a sublayer as a layer object that can be used by Query Layer. I think you don't achieve anything useful for this context by using the sublayerID with Get Layer. The only way I know about is to use getLayer with Layer set to the map service id to get the url with token to the map service. Then use Parse Url with $layer1.layer.url as input. The url to the particular map service layer can be constructed as layerUrl=$parseUrl.request + "/<sublayerId>" + $parseUrl.queryString. Then, use this url as url input to Query Layer

     

    If someone has a better way to do this, please let me know

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.