dataease-dm/core/core-frontend/src/api/map.ts

14 lines
412 B
TypeScript
Raw Normal View History

2023-10-23 22:00:14 +08:00
import request from '@/config/axios'
import { FeatureCollection } from '@antv/l7plot/dist/esm/plots/choropleth/types'
export const getWorldTree = (): Promise<IResponse<AreaNode>> => {
return request.get({ url: '/map/worldTree' })
}
export const getGeoJson = (
country: string,
areaId: string
): Promise<IResponse<FeatureCollection>> => {
return request.get({ url: `/map/${country}/${areaId}.json` })
}