Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6288

error when accessing latitude and longitude value in geolib

$
0
0

In my react native app I have used geolib to find the nearest place to a certain point from a list of places, like this

const nearestPlace = geolib.findNearest({ latitude:6.4423456, longitude:75.9095818 }, (places));

once I console log nearestPlace I get one latitude, longitude pair but when I try to get the value of the latitude like this,

const latitudeValue = nearestPlace.latitude

It's giving me an error saying property latitude does not exist on type 'GeolibInputCoordinates' so I can't get the latitude value.

Any Idea how to solve this?


Viewing all articles
Browse latest Browse all 6288

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>