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.
Can't handle to use a WMS layer as a base layer, cause after setting the layer (openlayers/layers/Base/edit) as a BaseLayer
it still only shows up in the "Overlay layers" list on preset edit (openlayers/presets/4326/edit - Layers&style tab)
Comments
Comment #1
batje CreditAttribution: batje commentedHi,
I spent a few days learning openlayers and trying to find this. Here is my current workaround.
The current isBaselayer setting on a wms map, only can tell WMS that this is a baselayer, but not the drupal openlayers module. You have to add a second parameter for that in includes/layer_types/wms.inc
Besides that, the value returned for isBaselayer has to read 'true' not 1 or 0.
This is definitely ugly, but it works.
Then, you might run into projection issues. (i did) in the openlayers.js file, here is what i found:
Telling openlayers the units are in 'm' does not change the behaviour of OSM & Google, but it fixes scaling issues in WMS.
3 lines further
Not sure why that value is hardcoded. Using auto fixes the rest of trouble i had with WMS.
As i said, i am learning while doing, so I might have broken other things out of noobing around.
The only issue I can see so far is that our geowebcache on *some* zoomlevels is shifting the background projection. The same tiles, served from geoserver directly are perfectly fine. I had not noticed before (how could i, i didnt have a wms baselayer), so might not be related.
Hope that helps you and the developers.
(6-8-2010 added some detail)
Comment #2
tmcw CreditAttribution: tmcw commentedFixed in: http://drupal.org/cvs?commit=403394
batje: can you open a ticket for the specific projection problems you're experiencing?
Comment #3
strk CreditAttribution: strk commentedTested and confirm the fix. Thanks.
Comment #4
batje CreditAttribution: batje commentedThere is an issue for the WMS resolution here
http://drupal.org/node/878644
and for the geowebcache issue here
http://drupal.org/node/878662