Upgrade to OpenLayers 3
OpenLayers 3 looks awesome and feature-complete, and it would be great to integrate it into Neatline. Last week, I did a little bit of tinkering on a feature/ol3 branch, which so far just adds OL3 to the build and spins up a basic map in the _initOpenLayers method in the map view, just as an exercise to start grokking the new API.
I don't think migrating the Javascript in the core plugin will be that hard - just a matter of working through the public and editor map views and swapping in the new API. That said, I see two difficulties:
- Right now, the import-SVG feature uses a custom geometry handler that I wrote last year. This needs to be migrated to OpenLayers 3 as well, and I suspect that this will involve basically rewriting it from scratch. I don't think this will be terribly onerous (it's only ~400 LOC), but I think it will be significantly harder than migrating the userland code in Neatline proper.
- OpenLayers 3 basically eliminates Google base layers, at least in the way that we were able to use them in the past. I don't entirely understand this, but here's what I can gather - it seems that Google doesn't actually expose its tiles in a generic sense, like providers like OSM and Stamen do. In OpenLayers 2.x, I believe that the
OpenLayers.Layer.Googlelayers would actually spin up a native Google maps instance and graft it on top of the underlying OpenLayers map, as long as the Google base layer was selected. This is sort of crazy, and its seems that OpenLayers 3 just refuses to play ball (understandably). There is nool.source.Google, in the way that we have access to stuff likeol.source.OSMorol.source.Stamen. I filed a ticket about this, and the answer was basically "no," so I think we should assume this won't happen.
One option would be to replace Google maps with Bing maps, which OL3 does support. This isn't ideal, though, since there are significant cosmetic differences between the two, and exhibits built on Google layers might not work as well with the Bing data / color palette. On the other hand, we need to upgrade sooner or later - OL2 is starting to feel dated.