How to create Location object
Clash Royale CLAN TAG#URR8PPP
How to create Location object
I am trying to make a new location and set its latitude/longitude like this:
var targetlocation = Location("")
//this example code doesn't work below
targetlocation.setLatitude(55.555555)
targetlocation.setLongitude(55.555555)
How can I do this correctly in kotlin? Thanks.
1 Answer
1
I haven't tried this but try doing this.
var targetlocation = Location("")
targetlocation.latitude = 55.555555
targetlocation.longitude = 55.555555
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Hi I tried that already but i get "expecting member declaration" error
– Noob
4 mins ago