Skip to content
Snippets Groups Projects

Resolve #3458178 "Add french IGN maps in 2.2 branch"

Open Olivier Hertrich requested to merge issue/leaflet_more_maps-3458178:2.2.x into 2.2.x
Files
2
+ 13
0
@@ -107,6 +107,18 @@ class SettingsForm extends ConfigFormBase {
]),
];
$form['global_settings']['ign_api_key'] = [
'#type' => 'textfield',
'#size' => 43,
'#title' => $this->t('IGN API key'),
'#default_value' => $config->get('ign_api_key') ?? '',
'#description' => $this->t('If you use a <a href="@ign_maps" target="_ign_maps">IGN</a> map, please sign up for an account, <a href="@api_key" target="_api_key">create an API key</a> and paste it above. See <a href="https://geoservices.ign.fr/actualites/2023-11-20-acces-donnesnonlibres-gpf"> this article from IGN</a>',
[
'@ign_maps' => 'https://geoservices.ign.fr/',
'@api_key' => 'https://cartes.gouv.fr/',
]),
];
$form['global_settings']['mapbox_access_token'] = [
'#type' => 'textfield',
'#size' => 83,
@@ -242,6 +254,7 @@ class SettingsForm extends ConfigFormBase {
$this->config('leaflet_more_maps.settings')
->set('thunderforest_api_key', $form_state->getValue('thunderforest_api_key'))
->set('ign_api_key', $form_state->getValue('ign_api_key'))
->set('mapbox_access_token', $form_state->getValue('mapbox_access_token'))
->set('mapycz_api_key', $form_state->getValue('mapycz_api_key'))
->set('here_api_key', $form_state->getValue('here_api_key'))
Loading