import { onMount } from "solid-js"
import { Scene } from '@antv/l7';
import { GaodeMap } from '@antv/l7-maps';

import config from "../base/config"

import "./bacgroundMap.css"

function itemHead() {
    onMount(() => {
        new Scene({
            id: 'map',
            logoVisible: false,
            map: new GaodeMap({
                style: 'dark',
                center: [108.945, 34.205],
                pitch: 0,
                zoom: 15,
                logoVisible: false,
                token: config.gaodeToken,
            }),
        });
    })
    return <div id="map"></div>
}

export default itemHead;
