Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It might be common sense, but I missed it so this detail will save many folks a fair bit of confusion
This should be identified in the DOCs
to use zoombox you must enable navigation.
Comments
Comment #1
spydmobile CreditAttribution: spydmobile commentedAnother DOC ommision
to use a WMS layer as an overlay layer by setting
You must also set the params as follows:
If you dont, the WMS will be rendered opaque and this will force the layer to be presented as a BASE layer
Comment #2
tmcw CreditAttribution: tmcw commentedThe former, yes, that's going in the documentation, the second is an upstream fix for the OpenLayers javascript library, not something for the openlayers module.
Comment #3
phayes CreditAttribution: phayes commentedFixed: http://drupal.org/cvs?commit=281022
Although technically the transparency issue should be fixed in openlayers.js, it is pretty confusing, so I added a small check and fix.
For the ZoomBox I considered doing the same sort of check and fix, but I think this is better taken care of in documentation, since controls are almost always set explicitly. I've updated the docs.
Comment #4
tmcw CreditAttribution: tmcw commentedEh, sorry, I misread the deal with the WMS layer information.
I think that the problem isn't... really a problem? Like, the problem is that you aren't setting the layer to be transparent besides filled areas. The opaque layer is still an overlay (like, you could want it to be as it is so that you could set it to 25% opacity or whatever as an overlay), not a base layer in OpenLayers's book. The fix should be a fix in the layer definition, and eventually a WMS client which lets all params be set, not an invisible automatic parameter, which will only cause confusion and possibly bugs if people use WMS servers which fail on the transparent parameter.
Comment #5
spydmobile CreditAttribution: spydmobile commentedSorry tmcw, I am unsure what you mean.
I was trying to explain that:
If you set the param to make your layer a baselayer, The assumption of the user will be that if I set this, it will be rendered as baselayer and appear as a radio in the base layer group and if they set it false that it will be an overlay as a checkbox in overlays,
but if you dont set the transparency, the base layer param is overridden and the user wont know why unless this is explained in the Dox.
This will probably only affect WMS layers.
Does that make more sense than what I said earlier?
F
Comment #6
tmcw CreditAttribution: tmcw commentedOkay, so this is a problem in the ridiculous API of OpenLayers. In the WMS layer type,
and
I think that the solution is to set noMagic to true to stop OpenLayers from shooting us in the feet all the time.