react-native-radar
react-native-radar copied to clipboard
No coordinates returned by `searchPlaces`?
Summary
When calling Radar.searchPlaces, results are returned, but they only have categories, name, and _id keys. Based on the docs, I'd expect to see a location object as well with a type string and coordinates tuple. Is this expected behavior/something I've missed in the docs, or a bug?
Here's a screenshot from my demo app showing the issue:
Code to reproduce
Sample repo can be provided on request, but here's the entirety of my repro's App.js:
import React, { useState } from 'react';
import { SafeAreaView, ScrollView, Text, Button } from 'react-native';
import Radar from 'react-native-radar';
const App = () => {
const [responseData, setResponseData] = useState('');
return (
<SafeAreaView>
<ScrollView contentInsetAdjustmentBehavior="automatic">
<Button
title="Get Places!"
onPress={async () => {
try {
const results = await Radar.searchPlaces({
near: {
latitude: 45.5152,
longitude: -122.6784,
},
categories: ['arts-entertainment'],
});
setResponseData(JSON.stringify(results, null, 2));
} catch (err) {
console.error('something went horribly wrong!', err);
}
}}
/>
<Text>{responseData}</Text>
</ScrollView>
</SafeAreaView>
);
};
export default App;
Steps to reproduce
- Generated with
npx react-native init rnRadarDemo -
npm i react-native-radarand related iOS steps
OS version
iOS 15.0.1
SDK installation method
npm + Pod
SDK version
- react-native-radar 3.1.6
- RadarSDK 3.1.10
Other information
Let me know if any other info is helpful!