Refresh Map in GVH using Workflow 5
From what I have seen there is no simple Refresh Map call anymore for GVH. It looks like I am supposed to use Get Layer and then Refresh Layer but am unable to get it to work
My site.xml looks like this for the service/layers I want to refresh
<MapService ConnectionString="url=https://devgis.saskatoon.ca/arcgis/rest/services/Core/WaterValvesNew/MapServer" .... ID="17" ....>
<CachedServiceData />
<Layers>
<Layer ... LayerListID="153" NativeID="0" .... />
<Layer ... LayerListID="154" NativeID="1" .... />
<Layer ... LayerListID="155" NativeID="2" .... />
<Layer ... LayerListID="156" NativeID="3" .... />
<Layer ... LayerListID="157" NativeID="4" .... />
<Layer ... LayerListID="158" NativeID="5" .... />
<Layer ... LayerListID="159" NativeID="6" .... />
<Layer ... LayerListID="160" NativeID="7" .... />
</Layers>
</MapService>
To refresh NativeID 0 from the documention I think I am supposed to pass 17 as my Layer ID to Get Layer and possibly 0 as the Sublayer ID and then for the Refersh Layer would then be =$layer1.sublayer
This doesn't work for me. Fiddler doesn't show an attempt of any sort.
Also this is really cumbersome. A call of RereshMap that took 15 seconds in the past now becomes way more cumbersome to add as well as manage (imagine changing IDs that will break the workflow).
-
Hi @Kevin Rathgeber? ,
You've got the right idea putting 17 into a Get Layer activity. You'll want to pass along =$layer1.layer instead of =$layer1.sublayer to the Refresh Layer activity.
The viewer only uses a single web request whenever it draws map services that have multiple sublayers (which is good- it's nice and efficient). But that means that you'll have to "refresh" the whole map service at once with the Refresh Layer activity in scenarios where just one sublayer was updated.
0 -
That worked. Thank you very much.
0 -
Hi @Amanda Frech?
What would be best practice to refresh the entire map (multiple services) in GVH? The way I'm doing it now is to do a GetMap activity and then do a ForEach over all layerIDs ($map1.map.layerIDs). Inside the ForEach I'm doing a GetLayer and do the RefreshLayer.
I have to include an If-statement now inside my ForEach because I have a vectorTile layer which errors on the RefreshLayer...
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
3 kommentarer