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

m.stenta’s picture

Issue summary: View changes
m.stenta’s picture

Before diving into this, I would like to give some consideration to an alternative: Leaflet.js

#2496845: Scope conversion to Leaflet

m.stenta’s picture

Hmm. 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?

m.stenta’s picture

Found 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...

m.stenta’s picture

Posted 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

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

Making 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...

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

I'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.)

m.stenta’s picture

m.stenta’s picture

m.stenta’s picture

Status: Active » Closed (fixed)

Phew! 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...

m.stenta’s picture

Added the punted tasks to #2539404: [META] FarmOS 7.x-1.0-beta5.