moved serives into subfolder services

This commit is contained in:
Janis Meister
2022-01-26 11:38:47 +01:00
parent 519da1dd60
commit 33aa62ae09
9 changed files with 9 additions and 8 deletions

View File

@@ -1,13 +1,14 @@
import { Component, OnInit, ElementRef, ViewChild} from '@angular/core';
import { Nominatim } from '../interfaces/nominatim';
import { NominatimService } from '../nominatim.service';
import { NominatimService } from '../services/nominatim.service';
import { Photon, PhotonFeatureCollection } from '../interfaces/photon';
import { PhotonService } from '../photon.service';
import { OsrmService } from '../osrm.service';
import { PhotonService } from '../services/photon.service';
import { OsrmService } from '../services/osrm.service';
import { Osrm } from '../interfaces/osrm';
import { AppComponent } from '../app.component';
@Component({
selector: 'app-search',
templateUrl: './search.component.html',

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Nominatim } from './interfaces/nominatim';
import { Nominatim } from '../interfaces/nominatim';
import { Observable } from 'rxjs';
@Injectable({
@@ -12,7 +12,7 @@ export class NominatimService{
constructor(private http: HttpClient) { }
// sends a query request to Nominatim and gets response (https://nominatim.org/release-docs/develop/api/Search/)
sendQueryRequest(q: string): Observable<Nominatim[]> {
sendQueryRequest(q: string): Observable<Nominatim[]> {
return this.http.get<Nominatim[]>("https://nominatim.openstreetmap.org/search.php?format=jsonv2&q=" + q);
}
}
}

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Osrm } from './interfaces/osrm';
import { Osrm } from '../interfaces/osrm';
@Injectable({
providedIn: 'root'

View File

@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { PhotonFeatureCollection } from './interfaces/photon';
import { PhotonFeatureCollection } from '../interfaces/photon';
import { Observable } from 'rxjs';
@Injectable({