I have an arraylist that consists of a latLong object, as shown below:
ArrayList < LatLng > latLngList = new ArrayList< LatLng >();
Note. LatLng is an object that has latitude and longitude values in dual format, i.e. Latitude in dual format, and Longitude in dual format
The following are the values that are stored in the above latLngList object :
Lat Long List:[lat/lng: (34.072516,-118.403609), lat/lng: (34.074227,-118.399248), lat/lng: (34.07304,-118.3995), lat/lng: (34.07304,-118.3995), lat/lng: (34.07304,-118.3995), lat/lng: (34.067856,-118.401485)]
Now, since I am dealing with google map v2 in android, whenever I click on a specific marker, I get the position of latitude and longitude, and I try to compare it with the latLngList object to find out if the object is present in latLngList .
I do it as follows:
for(LatLng latLng : latLngList) {
marker.getPosition().equals(latLng); **Always returns false**
}
The marker position returns me with the following latLng object:
lat/lng: (34.074226888265116,-118.39924816042185)
, , , , , , .
latLng?