# geojson **Repository Path**: gaojuqian/geojson ## Basic Information - **Project Name**: geojson - **Description**: json 试用 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-03-29 - **Last Updated**: 2021-07-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ```javascript import axios from 'axios'; import notification from 'ant-design-vue/lib/notification'; export async function impMapJSON (ECharts, name) { let json = `https://unpkg.com/my-geojson@1.0.0/json/${name}_full.json` try { let resp = await axios({ url: json, method: 'get' }) // console.log('geojsonrespdata:', resp.data) if (resp.status == 200) { ECharts.registerMap(name, JSON.stringify(resp.data)) } } catch (err) { notification.error({ message: 'NPM包资源加载或解析失败', }) console.log('geojsonerr:', err) } } ```