- attivita
- gestione degli script sul server - creato websocket per interagire con gli script del server.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { tools } from "./tools";
|
||||
|
||||
// geocoding.ts
|
||||
export const getCityFromCoordinates = async (lat: number, lon: number): Promise<string | null> => {
|
||||
const url = `https://nominatim.openstreetmap.org/reverse?lat=${lat}&lon=${lon}&format=json`;
|
||||
@@ -17,3 +19,12 @@ export const getCityFromCoordinates = async (lat: number, lon: number): Promise<
|
||||
}
|
||||
};
|
||||
|
||||
export const getMapBoundaries = (): any => {
|
||||
const ne = tools.getCookie(tools.COOK_MAPBOUNDS + 'ne', '{"lat": 20, "lng": 30}', false)
|
||||
const sw = tools.getCookie(tools.COOK_MAPBOUNDS + 'sw', '{"lat": 25, "lng": 35}', false)
|
||||
|
||||
// console.log('getMapBoundaries', ne, sw)
|
||||
|
||||
return { ne, sw }
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user