Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gradle dependency to use Latlng in java project [closed]

I want to use the Latlng class in my java project. https://developers.google.com/android/reference/com/google/android/gms/maps/model/LatLng

Can someone tell me the gradle dependency for that.

like image 461
Kuldeep Avatar asked Sep 27 '22 10:09

Kuldeep


1 Answers

Um, well, that class would appear to be part of the Maps V2 library given its Java package, and so the dependency is on the com.google.android.gms:play-services-maps artifact from the Google Repository.

However, loading in all of Maps V2, just for the tiny LatLng class, would not seem to be a wise move. If you are going to be integrating more of Maps V2, then OK, but if you just want a class to track two double values, it would make more sense to write your own or use the Android SDK's own Location class.

like image 71
CommonsWare Avatar answered Sep 30 '22 01:09

CommonsWare