123456789101112131415161718192021222324 |
- import axios from "./instance";
- import { MAP_TILE_LIST } from "./constant";
- type ServiceMapTile = {
- id: number;
- name: string,
- mapUrl: string;
- coord: string;
- };
- export type MapTile = {
- id: number;
- name: string,
- mapUrls: {tempUrl: string, maximumLevel: number}[];
- coord: string;
- };
- export const fetchMapTiles = async () => {
- const items = await axios.get<ServiceMapTile[]>(MAP_TILE_LIST);
- return items.map((item) => ({
- ...item,
- mapUrls: JSON.parse(item.mapUrl),
- }));
- };
|