How to create Location object

The name of the pictureThe name of the pictureThe name of the pictureClash 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





Hi I tried that already but i get "expecting member declaration" error
– Noob
4 mins ago






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.

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results