I have an issue with google maps marker where am passing position with longitude and latitude with some values which, after passing to the code below, the value for longitude is slightly changing (some trailing values are being added). Can someone please help me on this? PFB code.
var lat = parseFloat(asset.latitude);
var lon = parseFloat(asset.longitude);
window.marker[i] = new google.maps.Marker({
position: new google.maps.LatLng(lat, lon),
icon: image,
map: that.map,
animation: google.maps.Animation.DROP,
title: asset.Description,
equipment: ""
});
Trailing value added to coordinate from console:
Here, I have passed longitude as -68.83577
but after it is passed to marker API, its value got changed as -68.83577000000002
. My issue is why some trailing values are being added.