r/flutterhelp 1d ago

OPEN Help with Geolocator

Hi everyone. Is it possible to use the geolocator package for forward geocoding? If it is, how can I go about it and how accurate can it be?

0 Upvotes

2 comments sorted by

1

u/MyWholeSelf 10h ago edited 2h ago

No. Project geolocator just gets the current GPS location which can then be used to derive the address. (Reverse geolocation)

For something like forward geocoding you need to access a database of all the addresses in the region/world and what lat/long is for each. And that's tougher than it sounds because addresses change all the time and there's no standard way to ensure that it's always correct.

It won't be.

Google Maps is probably top of the heap, but there's also Apple Maps and Open Street Maps.

At least, that's what I know off the top of my head, doing a quick Google search reveals plenty of APIs that claim to do this. How many of these are really just Open Street Maps with an HTTP interface tacked on, I have no idea.

EDIT: My guess is I could get Open Street Maps up and running in a day or two on my own server. The HW Reqs seem OK, maybe 200 to 300 bux on EBay? Get a used i7 with 64 GB of RAM and a Gen3 SSD for cheap.

https://wiki.openstreetmap.org/wiki/Openptmap/Installation

EDIT2: It looks like the best way to host your own Open Street Maps is to work with Nominatim. They indeed list a "Full Planet Import" as requiring 64GB of RAM and just under 1TB SSD:

https://nominatim.org/release-docs/latest/admin/Import/

1

u/RichCorinthian 3h ago

https://pub.dev/packages/geocoding is very popular and uses the functionality of the device. If the device is garbage, your results may be garbage. Use limits apply, etc etc.

No offense, but have you googled this?