2019-02-13 14:47:32 -05:00
|
|
|
/**
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
* or more contributor license agreements. See the NOTICE file
|
|
|
|
* distributed with this work for additional information
|
|
|
|
* regarding copyright ownership. The ASF licenses this file
|
|
|
|
* to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance
|
|
|
|
* with the License. You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing,
|
|
|
|
* software distributed under the License is distributed on an
|
|
|
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
* KIND, either express or implied. See the License for the
|
|
|
|
* specific language governing permissions and limitations
|
|
|
|
* under the License.
|
|
|
|
*/
|
2020-09-03 15:02:23 -04:00
|
|
|
import { t, ChartMetadata, ChartPlugin } from '@superset-ui/core';
|
2019-02-13 14:47:32 -05:00
|
|
|
import thumbnail from './images/thumbnail.png';
|
2021-07-02 12:28:36 -04:00
|
|
|
import example1 from './images/MapBox.jpg';
|
|
|
|
import example2 from './images/MapBox2.jpg';
|
2020-05-19 14:14:24 -04:00
|
|
|
import controlPanel from './controlPanel';
|
2019-02-13 14:47:32 -05:00
|
|
|
|
|
|
|
const metadata = new ChartMetadata({
|
2021-07-02 12:28:36 -04:00
|
|
|
category: t('Map'),
|
2019-02-13 14:47:32 -05:00
|
|
|
credits: ['https://www.mapbox.com/mapbox-gl-js/api/'],
|
|
|
|
description: '',
|
2021-07-02 12:28:36 -04:00
|
|
|
exampleGallery: [
|
|
|
|
{ url: example1, description: t('Light mode') },
|
|
|
|
{ url: example2, description: t('Dark mode') },
|
|
|
|
],
|
2019-02-13 14:47:32 -05:00
|
|
|
name: t('MapBox'),
|
2021-07-24 05:03:22 -04:00
|
|
|
tags: [
|
|
|
|
t('Business'),
|
|
|
|
t('Intensity'),
|
|
|
|
t('Legacy'),
|
|
|
|
t('Density'),
|
|
|
|
t('Scatter'),
|
|
|
|
t('Transformable'),
|
|
|
|
],
|
2019-02-13 14:47:32 -05:00
|
|
|
thumbnail,
|
|
|
|
useLegacyApi: true,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default class MapBoxChartPlugin extends ChartPlugin {
|
|
|
|
constructor() {
|
|
|
|
super({
|
2019-02-13 15:14:15 -05:00
|
|
|
loadChart: () => import('./MapBox'),
|
2021-10-21 22:35:46 -04:00
|
|
|
loadTransformProps: () => import('./transformProps'),
|
2019-02-13 14:47:32 -05:00
|
|
|
metadata,
|
2020-05-19 14:14:24 -04:00
|
|
|
controlPanel,
|
2019-02-13 14:47:32 -05:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|