Hi Ben, we recently moved WMS and WFS into our GPU workflow and noticed following friction points where we had to write workarounds or guards where we thought that ThinkGeo could natively handle this.
Take this as a wishlist which would make our adoption easier or maybe the implementation even better 
Bugs / lifetime contracts to fix
-
Concurrent opening is unsafe despite
ThreadSafetyLevel.Safe.
LayerTileViewcallsOpenAsyncper visible tile.AsyncLayer.OpenAsyncchecks
IsOpen, awaits initialization, and then setsIsOpen, without serializing callers.
AsyncFeatureSource.OpenAsynchas the same gap. Both WMS and WFS advertise Safe.
WMS capabilities parsing can therefore run concurrently against shared state.
AGK observedIndexOutOfRangeExceptionwith the Bayern Festpunkte service after
moving it into a MultiTile LayerOverlay; serializing initialization fixed the
reported failure. WFS has the same unguarded entry path by code inspection;
an equivalent WFS crash has not been reproduced on Windows.Request: serialize/coalesce opening in the SDK, including retry after failure and
cancellation. Keep tile downloads parallel. Test simultaneous opening of one
reader and document the open/close concurrency contract.Reproduction shape: put a WmsAsyncLayer configured for
https://geoservices.bayern.de/od/wms/afis/v1/festpunkte?into an already-open
MultiTile LayerOverlay so tiles open it lazily; alternatively issue overlapping
OpenAsynccalls on the same closed reader. UseDrawAndThrowExceptionto see
the failure rather than only an error tile. Timing affects reproduction. -
SDK-created HTTP clients lack deterministic layer cleanup.
WebBasedAsyncLayercreates an HttpClient, but has no corresponding close/dispose
cleanup. WFS’s feature source borrows that client, so closing the feature source
does not release it either.WmsRasterTileSourcealso creates clients and exposes
neither Close nor IDisposable/IAsyncDisposable.Request: define ownership for supplied clients/handlers versus SDK-created ones,
provide deterministic disposal, and clean up failed opens. Keeping a client for
reuse across Close/Open can be valid, provided final disposal exists. AGK currently
releases owned clients on closure/failed opening throughWebLayerLifecycle. -
Opening cancellation is swallowed.
AsyncLayer.OpenAsyncreturns normally for an already-cancelled token and catches
OperationCanceledException/TaskCanceledException without rethrowing, leaving a
reader closed. This can look like successful initialization to callers. It can
also hide HttpClient timeouts, whose exception derives from TaskCanceledException.Request: propagate caller cancellation as a cancelled task; preserve timeout
failures when the caller’s token is not cancelled. AGK checks cancellation again
after opening before querying metadata or constructing GPU adapters.
API improvements that would remove AGK workarounds
-
A configurable, owned WMS GPU source.
The v15 sample uses WmsRasterTileSource. It supports request headers through
SendingHttpRequest, parameters, output format, proxy and timeout. However, it
hides its WmsClient, fixes the CRS to EPSG:3857, and lacks metadata and lifetime
APIs. AGK needs selected layer/style names, credentials, transparent GetMap,
GetServerLayers scale advice and deterministic cleanup.Request: accept a configured WmsAsyncLayer or WmsClient, with explicit ownership,
or expose equivalent configuration/metadata and disposal. This would let AGK
delete its smallWmsLayerTileSourceadapter. Non-3857 GPU support is a separate
enhancement; AGK currently falls back to classic for those configurations. -
Visible-only, cancellable LayerOverlay opening.
LayerOverlay.OpenAsyncCore currently opens every layer, including hidden remote
services, without a draw cancellation token. A hidden unavailable service can
therefore delay or fail map initialization.Request: support deferred/visible-only opening with cancellation, while retaining
wrapping setup. AGK overrides that initialization inStaticLayerOverlay. -
Metadata-only async feature translation.
FeatureLayerTranslator obtains geometry information through a synchronous source
adapter. If that adapter was closed, it opens it and closes it afterward. AGK
pre-opens the adapter to retain the independent WFS reader across restyles.Request: allow supplying geometry metadata, or provide async translation with a
clear borrowed-source contract, so style changes require no service opening or
closure. This is an API improvement, not a claim that temporary-open cleanup is
intrinsically wrong.
Thanks!
J
