-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmapping.ts
More file actions
23 lines (18 loc) · 825 Bytes
/
mapping.ts
File metadata and controls
23 lines (18 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { type GetMapDataAndMarkersResult } from '@/models/v4/mapping/getMapDataAndMarkersResult';
import { type GetMapLayersResult } from '@/models/v4/mapping/getMapLayersResult';
import { createApiEndpoint } from '../common/client';
const getMayLayersApi = createApiEndpoint('/Mapping/GetMayLayers');
const getMapDataAndMarkersApi = createApiEndpoint('/Mapping/GetMapDataAndMarkers');
export const getMapDataAndMarkers = async (signal?: AbortSignal) => {
const response = await getMapDataAndMarkersApi.get<GetMapDataAndMarkersResult>(undefined, signal);
return response.data;
};
export const getMayLayers = async (type: number, signal?: AbortSignal) => {
const response = await getMayLayersApi.get<GetMapLayersResult>(
{
type: encodeURIComponent(type),
},
signal
);
return response.data;
};