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.
Openlayers now has an officially supported release for the 7.x-3.x branch: 7.x-3.0-beta1
This task is to upgrade all Farm modules that use Openlayers to the new release.
There is no automated upgrade path from the 2.x branch, so this will be a manual process.
First step: #2496831: Document Openlayers 2.x usage
Comments
Comment #1
m.stentaAdded #2496831: Document Openlayers 2.x usage as a first step.
Comment #2
m.stentaBefore diving into this, I would like to give some consideration to an alternative: Leaflet.js
#2496845: Scope conversion to Leaflet
Comment #3
m.stentaHmm. Running into a big issue right out of the gate. The Openlayers 3.x module does not provide any sort of upgrade path, and it adds dependencies on two modules: Registry Autoload and Service Container.
The Registry Autoload module helps to load the necessary namespaced classes that the Openlayers module uses. However, without that enabled, a PHP fatal error occurs immediately upon upgrading the module. It happens in openlayers_libraries_info(), and the issue is documented here: #2456859: Upgrade Error from 7.x-2.0-beta11 to 7.x-3.0-beta1
This is going to pose a significant upgrade issue... it makes it impossible to simply overwrite the old farmOS distro with a new one.
Are we going to have to require a manual upgrade procedure?
Comment #4
m.stentaFound a solution to #2456859: Upgrade Error from 7.x-2.0-beta11 to 7.x-3.0-beta1 (see patch in that issue).
Moving on...
Comment #5
m.stentaPosted a related issue regarding the NRCS Soil Survey map layer issue: #2537174: NRCS soil survey layer no longer available in EPSG:3857...
In that regard, it will be necessary to have WMS support in Openlayers 3 to be able to show the NRCS layers (unless there's another way of loading them). There's a patch available that adds WMS support: #2475355: Add WMS Layer Support to OL3
Comment #6
m.stentaComment #7
m.stentaComment #8
m.stentaMaking some really good progress on this... pretty much done with the farm_map and farm_soil modules, mostly done with the farm_area module, and I still have to look into the geolocation stuff.
I have pushed "openlayers3" branches up to all of those repositories in their current state. I'll keep this updated as work progresses...
Comment #9
m.stentaComment #10
m.stentaComment #11
m.stentaComment #12
m.stentaComment #13
m.stentaComment #14
m.stentaComment #15
m.stentaComment #16
m.stentaComment #17
m.stentaComment #18
m.stentaComment #19
m.stentaI'm going to punt a few minor things while we wait for some fixes in the Openlayers module. I will create new issues for each. Here are two:
#2543188: Add GoogleMaps Terrain and Satellite layers
#2543186: Fullscreen maps
(Both are related to bugs with Google Maps in Openlayers 3.x.)
Comment #20
m.stentaHere's another that is punted: #2543636: Assign orange style to clicked features
Comment #21
m.stentaComment #22
m.stentaPhew! This is done!
Just doing some last minute testing with live sites, but I'll be merging this in soon! And releasing farmOS beta4 shortly after...
Comment #23
m.stentaAdded the punted tasks to #2539404: [META] FarmOS 7.x-1.0-beta5.