farmOS-map.js?raivk3:2 Uncaught TypeError: l.unrender is not a function

I believe this is caused by an incompatibility between the version of OpenLayers that farm_map_google transitively uses.

farmos-olgm is built against OpenLayers 6.1.1 but farmOS-map is using 6.14.1.

This change caused the core OpenLayers renderer to require that all layer instances implement the unrender method.

We’ll need to follow up on this to get farmos-olgm and farm_map_google updated…

1 Like

I’ve opened a pull request for the first part of the changes to fix this.

2 Likes

We were able to get the new version of the forked Google maps library published to NPM and I’ve created a new pull request to include it in the farm_map_google module. I’ll probably wait until tomorrow morning in case @paul121 or @mstenta want to comment on the PR, then merge it and tag a new release (1.0.3) of the farm_map_google module. Once that’s done and the release is created on the Drupal.org project, the bug should be fixable by including that new version of the farm_map_google module.

1 Like

I merged the fix to farm_map_google and created the release on Drupal.org so this should now be fixed by installing farm_map_google 1.0.3.

3 Likes

That’s great @Symbioquine!

I forget: did this also require any changes to farmOS-map (and therefore a new release of farmOS to include those) also? I seem to remember that coming up in our chat, but I can’t remember why now. Or maybe it wasn’t necessary after all, and everything could be resolved in the Google Maps module itself?

Ah this is what I was remembering: IRC logs for #farmOS, 2022-04-18 (GMT) | irc.farmos.org

Yeah, I think I was wrong about that part. I might have been mixing it up with the ol-grid/ol-side-panel upgrades that I needed to do…

1 Like

thankyou @Symbioquine that was nice and easy to update using farm_map_Google 1.0.3. problem solved and for us Google maps is significantly more accurate than mapbox so really appreciated !

2 Likes