- Issue created by @jrochate
- 🇵🇹Portugal jrochate
I have used hook_leaflet_map_info_alter to change this to my use case.
Something like this:function MYMODULE_leaflet_map_info_alter(array &$map_info) { // Use headless protocol rather than logic based on global $is_https; $prot = '//'; $zyx = '{z}/{y}/{x}.png'; $attr_esri = 'Tiles © <a href="https://esri.com">Esri</a>'; $esri_names = [ 'Ocean/World Ocean Base', 'Ocean/World Ocean Reference', ]; foreach ($esri_names as $esri_name) { $code = str_replace(' ', '_', $esri_name); $url_template = $prot . "server.arcgisonline.com/ArcGIS/rest/services/$code/MapServer/tile/$zyx"; switch ($esri_name) { case 'Ocean/World Ocean Base': $label = 'New Esri Ocean (zoom 0..10)'; $settings['maxZoom'] = 10; break; case 'Ocean/World Ocean Reference': $label = 'New Esri Ocean Reference (zoom 0..10)'; $settings['maxZoom'] = 10; break; } $map_info['esri-' . mb_strtolower($code)] = [ 'label' => $label, 'description' => $label, 'settings' => $settings, 'layers' => [ 'layer' => [ 'urlTemplate' => $url_template, 'options' => ['attribution' => $attr_esri], ], ], ]; } }
- Assigned to ressa
- Status changed to Needs review
about 1 year ago 8:50am 14 October 2023 - 🇩🇰Denmark ressa Copenhagen
Thanks for reporting @jrochate, I create a Merge Request which should fix it, and tiles are now requested from this URL:
https://server.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_B...
- Issue was unassigned.
-
berramou →
committed b7d22e8d on 2.1.x
Issue #3335451: Current Esri Ocean Map is broken
-
berramou →
committed b7d22e8d on 2.1.x
- 🇫🇷France berramou
I can't merge https://git.drupalcode.org/project/leaflet_more_maps/-/merge_requests/6 so i commit it directly.
Than you @ressa. - Status changed to Fixed
10 months ago 9:08pm 4 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.