Map Layers (or custom maps) on the map view - Advice needed

Hi
I really love using the map view, because we have 80 hectares that I need to keep track of and just one brain.
The google maps module is mothballed, as you know. I am using Mapbox and the maps are fine, but I can’t figure out how people get the custom maps in there?

At the least, I’d like to have it show my own created map on mapbox, or wherever it may come from. Alternatively show layers that are useful to me.

I have webodm generated stuff with elevation, terrain models etc that are incredibly useful for our water earthworks and management. Any ideas would be appreciated, but I am open to alternative suggestions for maps too (i am under the impression the mapbox one is all we have?).

Regards
Marlon

2 Likes

Update on this! Originally reported by @paul121 in chat…

[16:17:14] <paul121[m]> Hot off the press, OpenLayers v9:
[16:17:14] <paul121[m]> > The 9.0 release add several new features, including a Google Maps source (finally!), improved WebGL line rendering, and a new symbol and text decluttering implementation. We also improved and broadened flat styles support for both WebGL and Canvas 2D renderers. For better developer experience, we made more types generic and fixed some issues with types.
[16:17:14] <paul121[m]> Release v9.0.0 · openlayers/openlayers · GitHub
[16:19:00] <paul121[m]> It looks like the Google Maps licensing issue is now resolved, they have a dedicated API key for Map Tiles!
[16:19:01] <paul121[m]> Option to integrate Google Maps Tiles (using the new Map Tiles API recently released, no hacks or licensing issues) · Issue #15461 · openlayers/openlayers · GitHub

This means we may be able to include a Google Maps layer option in farmOS core in the future!

Still some work to do on our end (update farmOS-map to OL9, add a farm_map_google module to farmOS w/ layer configuration, etc)… if anyone wants to get started!

The farm_map_mapbox module that comes with farmOS is very simple. It only pulls in two hard-coded layers (“Mapbox Outdoors” and “Mapbox Satellite”): farmOS/modules/core/map/modules/mapbox/js/farmOS.map.behaviors.mapbox.js at 3.x · farmOS/farmOS · GitHub - It does not have any functionality for adding “custom” Mapbox layers from your Mapbox account. Although that has been discusses/requested. No one has developed it yet.

@wotnak developed a farm_map_custom_layers module, which provides options for adding custom XYZ/WMS layer URLs: https://www.drupal.org/project/farm_map_custom_layers - If your custom Mapbox layers are available in those formats that might work!

1 Like