diff options
Diffstat (limited to 'Backend/Api')
-rw-r--r-- | Backend/Api/Api/Models/Location.cs | 9 | ||||
-rw-r--r-- | Backend/Api/Api/Services/LocationService.cs | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Backend/Api/Api/Models/Location.cs b/Backend/Api/Api/Models/Location.cs index 8cc4377..7c1a0bf 100644 --- a/Backend/Api/Api/Models/Location.cs +++ b/Backend/Api/Api/Models/Location.cs @@ -14,16 +14,15 @@ namespace Api.Models public String address { get; set; } public double latitude { get; set; } public double longitude { get; set; } - public LocationType type { get; set; } + //public LocationType type { get; set; } } public enum LocationType { - Plaza, - Grad, - Zgrada, - Itd + GRAD,ULICA,JEZERO,REKA,PLAZA,OKEAN, MORE, MOREUZ, MOST,BANJA, + PLANINA, VISORAVAN, PIRAMIDA, LIVADA, SELO, OSTRVO, POLUOSTRVO, KLISURA, ARHIPELAG, + ADA, DELTA, FJORD, GEJZIR, IZVOR, KOTLINA, MINERALNI_IZVOR, PECINA ,SUMA, VODOPAD,VULKAN } } diff --git a/Backend/Api/Api/Services/LocationService.cs b/Backend/Api/Api/Services/LocationService.cs index 292fc0e..e244ed6 100644 --- a/Backend/Api/Api/Services/LocationService.cs +++ b/Backend/Api/Api/Services/LocationService.cs @@ -28,6 +28,7 @@ namespace Api.Services public async Task<Location> add(Location loc) { IEnumerable<Address> adresses = await _geocoder.GeocodeAsync(loc.name+" "+loc.address+" "+loc.city+" "+loc.country); + loc.country = loc.name; loc.latitude = adresses.First().Coordinates.Latitude; loc.longitude=adresses.First().Coordinates.Longitude; await _locations.InsertOneAsync(loc); |