Closed ghost closed 6 years ago
Hmm that is strange. Will check it tomorrow
Thank you. I appreciate it.
I don’t mean to rush but do you have any update?
What value does aera have?
Sorry for late response I didn't get email notification somehow. area is Osaka Abeno. I set iPhone simulator's current location to Osaka Abeno. But it returns Tokyo which is 400km away.
Hi,
I created a little example project in this repo now:
with 410km radius I get both cities back if I change it to 400 only Tokyo
I also tried 120km and I don't get Osaka. The same if I set the current position to Osaka, I don't see Tokyo with an radius of <410km
HI, sorry again. I tried that again but still return Tokyo. Could you share your code? I hate to say but could you run this code? This is exactly the same code that I ran.
final GeoPoint location = GeoPoint(34.649252, 135.539863);
final Area area = Area(location, 120.0);
return getDataInArea(
area: area,
source: Firestore.instance.collection('helper'),
locationFieldNameInDB: 'location',
mapper: (document) {
print(document.data);
// return
// flutter: {name: Tennoji Station, location: Instance of 'GeoPoint'}
// flutter: {name: Osaka Station, location: Instance of 'GeoPoint'}
// flutter: {name: Tokyo Station, location: Instance of 'GeoPoint'}
},
);
}
And this my Firestore
data looks like.
I'm sorry but hope you could help. Thank you so much.
Hi,
the code is in the example project of this repository I have honestly no idea why it does not work for you. Your code looks like mine
Thank you for replying. Yeah it's weird. Thanks anyway I'll figure it out somehow!
I'm trying to fetch document inside circle of 120.0 km. But it returns 400.0 km away. Is this a bug or I'm making some mistake?
This is Osaka Abeno.
This is Tokyo Station.
I searched these distance in google map and it returns over 400 km. I fetched like so.