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.
In some cases a baselayer needs to be available before other layers or controls can be added. For example adding a vector layer with strategy "Fixed" requires a baselayer. Can we add baselayers first or is there another way to solve this problem?
Comment | File | Size | Author |
---|---|---|---|
#1 | openlayers-add_baselayers_first-1817400-1.patch | 712 bytes | friedjoff |
Comments
Comment #1
friedjoff CreditAttribution: friedjoff commentedThe attached patch moves all baselayers to the top before adding them to the map.
Comment #2
friedjoff CreditAttribution: friedjoff commentedComment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedThis seems to work just fine, and solves the issue with #1387908: MapProjection is null error on initial fetching of kml layer.
A change in 2.11 (documented here: http://trac.osgeo.org/openlayers/ticket/3647) seems to require this change.
I'd prefer someone else more familiar with OpenLayers to RTBC this though.
Comment #4
PolComment #5
friedjoff CreditAttribution: friedjoff commentedIn the long run the "Fixed" strategy should be fixed directly in OpenLayers. I'll prepare a pull request on GitHub ASAP, but in the meantime we need to fix this here.
Comment #6
PolNice patch, committed !
Thanks !!