-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stand-alone GeoWebCache WMS-support in Hajk admin and client #1469
Comments
@Hallbergs @jacobwod I am trying to get a customer to see the benefit of Sweco contributing to Hajk for making Hajk-integration with stand-alone GWC smoother. If accepted, let's discuss solutions on upcoming code meetings. Heads-up with the idea of "qualifying" GeoWebCache to it's own Server Type in Hajk admin. Do you agree with that idea? Would you choose "geowebcache" or "geowebcache-standalone" in that case? (All other server types seems to be lowercase only in Hajk admin so my initial suggestion follows this principle.) NB! Bug report is not really complete yet, more details will follow. |
Thanks @sweco-semara, I absolutely agree. Also, you're correct about the assumptions made in Admin's code. It seems like nobody really tested standalone GWC before, hence the missing support. It'd be fantastic to get it implemented. Given the differences that you've identified, it seems valid to add another We can absolutely talk about it on the upcoming meeting. 👍 |
I've added some labels, please correct if I'm mistaken (specifically I'm not sure if this will require work in Client and Backend too). |
* Add support for new WMS server type "geowebcache-standalone" * Use constants for WMS versions and server types * Add optional support for configuring default server type as well as the existing default URL (fall back to "geoserver" if not present/backwards compatible)
hajkmap#1469 Stand-alone GeoWebCache support
hajkmap#1469 Stand-alone GeoWebCache support
This was tested successfully against a standalone GWC instance in dev, test and prod environments. Starting to clean up code and proceed with the PR. Core devs, for your information (initially a question but changed on second thought, see potential downsides below - moved to potential future work instead) Seeing where the implementation landed the changes might, with small adjustments, be extrapolated from GeoWebCache stand-alone to some generic "WMS server but not GeoServer" setting, i.e. Any WMS Server, not having the GeoServer REST API available for listing workspaces. The servertype name could then be changed, I guess e.g. QGIS Server would behave similar, to a bit more generic (e.g. from "geowebcache-standalone" to Potential downsides and reasoning against proceeding with generalization of all non-GeoServer WMS types already now, i.e. the reason to go ahead with proven "geowebcache-standalone" only for a first PR:
The new GWC stand-alone support and existing QGIS Server type will be a good base for generalization in a future Hajk improvement, GWC stand-alone PR could be a good starting point for "extracting up"/generalizing to a common server type for "geowebcache-standalone" + "qgis" to e.g. "generic-wms". Hower due to reasons above this might be complicated with e.g. WMS version defaults, so leaving it as-is for now with the proven and tested GWC stand-alone support. |
* Resolves hajkmap#1469 * Add support for new WMS server type "geowebcache-standalone" * Add optional support for configuring a default server type, as well as existing option for default URL (backwards compatible, falls back to "geoserver" if not present) * Re-name admin WMS option from "GeoWebCache" to tiled (since WMS-C tiled mode has nothing to do with GeoWebCache and it's now a supported server type, making the old admin title for tiled option very confusing) * Use constants for WMS versions and server types * Avoid non-conformant WMS v1.3.0 GetCapabilities for geowebcache-standalone server type * Automatically default to tiled loading for geowebcache-standalone server type * Spellcheck admin sv-SE labels for queryable layers ("klick") More robust WMS admin, guard against GetCapabilties load failures or format errors * Console warning if unsupported spatial reference system found in WMS capabilities * Fix: Async load could crash WMS admin if clicking too fast on layers/capabilities, not ready for projections update * Fix: Do not reference undefined objects in admin after failed GetCapabilities * Fix: Handle failed net requests e.g. due to CORS-block, instead of crashing admin * Fix: Handle API failures for getting layers config gracefully (e.g. API endpoint version mismatch), instead of crashing admin * Fix: Handle HTML responses with 200/OK for failed GetCapabilities (like e.g. Hajk development mode and GeoServer proxy)
PR is now ready for review. It includes several improvements for avoiding Hajk admin crashing on all sorts of configuration errors thrown at it during testing, including CORS block / WMS servers missing CORS headers for Hajk which has been a pretty common error in our customer's test and productions environments (before pointing this out). |
Describe the bug
Hajk is currently not able to integrate with stand-alone instances of GeoWebCache ("GWC") for WMS services, there are a couple of assumptions being made that only a GeoServer-bundled GeoWebCache will fulfill. E.g:
To Reproduce
Expected behavior
Hajk new-admin can be improved to reflect stand-alone GeoWebCache behaviour, i.e:
Additional context
geowebcache-standalone
(see discussion in comments).The text was updated successfully, but these errors were encountered: