https://kotlinlang.org logo
Title
j

jurajsolarml

04/05/2019, 2:37 PM
Hello, Can you help me? I have a question.I am beginner. I have to make a list of castles around 50km. How do I do this to be used API.
k

karelpeeters

04/05/2019, 2:47 PM
You need to give us a bit more information...
h

hudsonb

04/05/2019, 2:48 PM
Impossible to answer with the information provided. Do you have a class representing castles you could provide?
j

jurajsolarml

04/05/2019, 2:50 PM
The city is Bratislava.In the list should be the name of the castle, distance and photo.
I don't have a class.
h

hudsonb

04/05/2019, 2:56 PM
Are you looking for something like this?
data class Castle(val name: String, val distance: Double)
val castles = // ...parse the list into castles
castles.filter { it.distance <= 50 }
j

jurajsolarml

04/05/2019, 2:59 PM
It should use the API
h

hudsonb

04/05/2019, 3:00 PM
What API?
j

jurajsolarml

04/05/2019, 3:01 PM
Google Places API
m

Mike

04/05/2019, 3:01 PM
Homework? 😒tackoverflow:?
j

jurajsolarml

04/05/2019, 3:02 PM
Yes
:stackoverflow: 8
m

Mike

04/05/2019, 3:05 PM
Feel free to come back if you have questions about Kotlin as a language or tools around Kotlin. Currently, you’re asking for algorithm help, so that’s what Stackoverflow, and other research/resources are for.