feat(deckgl-map): use an arbitraty Mabpox style URL (#26027) (#26031)

Signed-off-by: François Travais <francois.travais@solinum.org>
This commit is contained in:
François Travais
2023-11-28 23:32:19 +01:00
committed by GitHub
parent 7223633da6
commit af58784040
14 changed files with 118 additions and 23 deletions

View File

@@ -16,7 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
import { FeatureFlag, isFeatureEnabled, t } from '@superset-ui/core';
import {
FeatureFlag,
isFeatureEnabled,
t,
validateMapboxStylesUrl,
} from '@superset-ui/core';
import {
columnChoices,
ControlPanelConfig,
@@ -224,6 +229,8 @@ const config: ControlPanelConfig = {
label: t('Map Style'),
clearable: false,
renderTrigger: true,
freeForm: true,
validators: [validateMapboxStylesUrl],
choices: [
['mapbox://styles/mapbox/streets-v9', t('Streets')],
['mapbox://styles/mapbox/dark-v9', t('Dark')],
@@ -236,7 +243,10 @@ const config: ControlPanelConfig = {
['mapbox://styles/mapbox/outdoors-v9', t('Outdoors')],
],
default: 'mapbox://styles/mapbox/light-v9',
description: t('Base layer map style'),
description: t(
'Base layer map style. See Mapbox documentation: %s',
'https://docs.mapbox.com/help/glossary/style-url/',
),
},
},
],