From 6ecf92554e151c74d1c37f2a5ee54a20c46d0194 Mon Sep 17 00:00:00 2001 From: mivasconcelos Date: Thu, 19 Oct 2023 15:31:54 +0100 Subject: [PATCH] Change Map provider --- web/src/components/PixiMap.tsx | 21 ++------------------- web/src/data/recoil.ts | 6 +++--- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/web/src/components/PixiMap.tsx b/web/src/components/PixiMap.tsx index 69a8d42..8c28634 100644 --- a/web/src/components/PixiMap.tsx +++ b/web/src/components/PixiMap.tsx @@ -6,7 +6,6 @@ import { Center, Divider, Flex, - Link, Stack, Text, Tooltip, @@ -15,6 +14,7 @@ import { useConst, } from "@chakra-ui/react"; import { Bounds, Map, PigeonProps, Point } from "pigeon-maps"; +import { osm } from "pigeon-maps/providers"; import * as PIXI from "pixi.js"; import * as React from "react"; import Select, { GroupBase, StylesConfig } from "react-select"; @@ -29,22 +29,6 @@ import { } from "@/data/recoil"; import { useConnectionState } from "@/view/hooks/hooks"; -const stamenProvider = - (flavor: "toner" | "toner-lite") => - (x: number, y: number, z: number, dpr = 1) => - `https://stamen-tiles.a.ssl.fastly.net/${flavor}/${z}/${x}/${y}${ - dpr >= 2 ? "@2x" : "" - }.png`; - -const stamenAttribution = ( - <> - Map tiles by Stamen Design, under{" "} - CC BY 3.0. - Data by OpenStreetMap, under{" "} - ODbL. - -); - export const DEFAULT_CENTER: [number, number] = [ DEFAULT_CITY.lonlat[1], DEFAULT_CITY.lonlat[0], @@ -371,8 +355,7 @@ export const PixiMap = ({ >({ key: "defaultSelectedCities", - get: async ({get}) => { + get: async ({ get }) => { const config = get(connectionConfig); let selectedCities: Array = []; try { selectedCities = await getCities(config); } catch (error) { selectedCities = []; - console.log('Failed to fetch selected cities details from the Database.'); + console.log("Failed to fetch selected cities details from the Database."); } return selectedCities; - } + }, }); export const selectedCities = atom>({