[FIXED!]
Im struggling with some problem:
I have got method like that:
fun getPointsInRectangularSpace(coordinates: RectCoordinates) = getAllPoints().filter { it -> it.lat in coordinates.latBot..coordinates.latTop && it.lng in coordinates.lngLeft..coordinates.lngRight }
getAllPoints method returns List<Point> (Point object is ( val lat : Double, val lng : Double)
RectCoordinates model:
RectCoordinates( val latBot: Double, val latTop: Double, val lngLeft: Double, val lngRight: Double)
I have got in database Points like this :
Point(3.00,2.00), Point(-2.00,4.00) , Point(0.00,0.00)
so where I use json like that
{ "bot":-5.00, "top":5.00, "left":-5.00, "right":5.00 }
It should return me all points, but returns only 0.00,0.00.
Im not sure if Im blind or something and somewhere lat and lng is mixed?
Edit: Fixed! When I added property
@JsonProperty
to every class field in RectCoordinates it started working fine
submitted by /u/Confident_Roof7310
[link] [comments]