import { jsonp } from "./util";

const windows: any = window
const mapDetail = ref()

const useMap = () => {
    const initMaps = () => {
        var geolocation = new windows.qq.maps.Geolocation(
            "3M5BZ-SFCRJ-AHSF7-XRA5Q-Y6NIJ-DXBH4",
            "myapp"
        )
        geolocation.getLocation(showPosition, showErr)
    }

    function showPosition(position: any) {
        console.log(position, '打印位置信息');
    }

    function showErr() { }

    return {
        initMaps
    }
}

export default useMap