From a30dfe730eb123532723d04ccbfa9807dbdaf8ad Mon Sep 17 00:00:00 2001 From: itskovacs Date: Mon, 3 Nov 2025 18:52:21 +0100 Subject: [PATCH] retrieve boundaries from location using GMaps API --- src/src/app/services/api.service.ts | 6 +++++- src/src/app/types/poi.ts | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/src/app/services/api.service.ts b/src/src/app/services/api.service.ts index 035c46c..69cdd52 100644 --- a/src/src/app/services/api.service.ts +++ b/src/src/app/services/api.service.ts @@ -1,6 +1,6 @@ import { inject, Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; -import { Category, GooglePlaceResult, Place } from '../types/poi'; +import { Category, GoogleBoundaries, GooglePlaceResult, Place } from '../types/poi'; import { BehaviorSubject, map, Observable, shareReplay, tap } from 'rxjs'; import { Info } from '../types/info'; import { Backup, ImportResponse, Settings } from '../types/settings'; @@ -325,4 +325,8 @@ export class ApiService { gmapsSearchText(q: string): Observable { return this.httpClient.get(`${this.apiBaseUrl}/places/google-search`, { params: { q } }); } + + gmapsGeocodeBoundaries(q: string): Observable { + return this.httpClient.get(`${this.apiBaseUrl}/places/google-geocode`, { params: { q } }); + } } diff --git a/src/src/app/types/poi.ts b/src/src/app/types/poi.ts index ae86685..dff6072 100644 --- a/src/src/app/types/poi.ts +++ b/src/src/app/types/poi.ts @@ -35,3 +35,8 @@ export interface GooglePlaceResult { allowdog: boolean; description: string; } + +export interface GoogleBoundaries { + northeast: { lat: number; lng: number }; + southwest: { lat: number; lng: number }; +}