GithubHelp home page GithubHelp logo

geocoder2's Introduction

Hi there! ๐Ÿ‘‹

๐Ÿš€ About Me

I am Mayank Diwakar, a Full-Stack Developer (particularly in Laravel & Flutter).

Languages

PHP JavaScript Dart Markdown python java

Front-End Development

HTML5 CSS3 TailwindCSS Bootstrap

Frameworks

Laravel React Js

Cross Platform Development

flutter

Hosting

Firebase Heroku Netlify Digital Ocean

Database

MySQL SQLite MongoDB

Design Tools

Canva figma

Others

Arduino Postman Git

Connect With Me

Instagram Gmail Telegram

๐Ÿ›ฐ Stats

flutterbuddy1

flutterbuddy1

geocoder2's People

Contributors

abdelrahmanelmarakby avatar dpedrinha avatar etabakov avatar flutterbuddy1 avatar jabguru avatar mo7amm1d avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

geocoder2's Issues

Geocoder2.getCoordinatesFromAddress returns Request Denied

I wrote an app that uses google search places. My app used geocoder package to get coordinate of the address. I'm converting my app to use null safety so I am using Geocoder2.

I'm using the function call in the documentation:

fetchGeocoder = await Geocoder2.getCoordinatesFromAddress(
address: "277 Bedford Ave, Brooklyn, NY 11211, USA",
//address: city + "," + state,
googleMapApiKey: AppData().getAPIKey());

fetchGeocoder returns "Request Denied". I store the API key in a custom call. This is retrieved by AppData().getAPIKey().

I am sure the API key is correct because I use the AppData().getAPIKey() in the google place search function call.

Missing type in LocationType

Hello, my friend
I'm here to report an issue that I face while using the latest version geocoder2: ^1.1.0 of your library.

When trying to use the library, I got this issue

type 'Null' is not a subtype of type 'LocationType'

After reviewing Reverse Geocoding documentation and comparing it to a library, it turned out that there are only 3 types in the library, while there are 4 types mentioned in the documentation.

The missing type is "RANGE_INTERPOLATED".

I took the liberty of changing the code which was:

enum LocationType { ROOFTOP, GEOMETRIC_CENTER, APPROXIMATE }

final locationTypeValues = EnumValues({
  "APPROXIMATE": LocationType.APPROXIMATE,
  "GEOMETRIC_CENTER": LocationType.GEOMETRIC_CENTER,
  "ROOFTOP": LocationType.ROOFTOP,
});

to the following:

enum LocationType { ROOFTOP, GEOMETRIC_CENTER, APPROXIMATE, RANGE_INTERPOLATED }

final locationTypeValues = EnumValues({
  "APPROXIMATE": LocationType.APPROXIMATE,
  "GEOMETRIC_CENTER": LocationType.GEOMETRIC_CENTER,
  "ROOFTOP": LocationType.ROOFTOP,
  "RANGE_INTERPOLATED": LocationType.RANGE_INTERPOLATED
});

After adding the missing type to locationTypeValues, the issue was FIXED.

I hope that cloud help fixing the issue.

Bad state: No element

I've been using it for a long time, but now it's not working and i got this message
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: No element
E/flutter (14161): #0 List.first (dart:core-patch/growable_array.dart:343:5)
E/flutter (14161): #1 Geocoder2.getDataFromCoordinates (package:geocoder2/src/geocoder2.dart:25:44)
E/flutter (14161):
E/flutter (14161): #2 MyApp.printdata (package:untitled/main.dart:12:20)
E/flutter (14161):

Indian Ocean => 6HH73GX2+X2

Hi!

I switched from geocoder to geocoder2 since geocoder didn't work anymore.

One of my previous tests that geocoded a point in the Indian Ocean now started to fail.

This worked better with geocoder then geocoder2 :-)

I can remove that test but I am just curious about if in general geocoder2 is worse than geocoder when it comes to such areas?

For this test below geocoder2 gives ...
formattedAddress: 6HH73GX2+X2
placeId: GhIJmZmZmZmZ8T8RAAAAAADARkA
... which to me is a bit cryptic.

    // From coordinates
    String? address = await geo.getAddress(LatLng(1.10, 45.50));
    expect(address, 'Indian Ocean');

Getting different languages every time I call getDataFromCoordinates()

Sometimes I call getDataFromCoordinates() and I get results like state and city in the local language (with accents for instance and with the local names) and some times I get the result in English (no accents and the English names).

Thing is, my device language is English, but my location is different from any English speaking country. That is on purpose precisely to test for devices of people traveling.

Is there a way to set the language I want to use or maybe always use the language of the coordinates?

For example, Rome is Roma in Italian. I'm in that situation where some values are being stored in the db in one language (country=Roma) but the users can't find any result because their location is being returned in English (country=Rome) even though they are in Rome/Roma and they saved the place in the database using the same device.

FeatureRequest: Function to return multiple addresses and not just the first match

It would be great to be able to get multiple addresses and not just the first match.
I'm happy to open a PR for this if this is something you think you'd be ok with including in this package?
Should be as easy as just re-writing the current function to return all matches and rename it and then have a function that with the original name that just grabs the first match from that new function

Geocoder2 vs geocoder

I'm trying to switch to your package but I'm not finding the correct syntax what's the equivalent of

          `var addresses = await Geocoder.local.findAddressesFromQuery(loc);

                var first = addresses.first;`

Bad state: No element Did not find frame.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: No element
E/FrameEvents(15179): updateAcquireFence: Did not find frame.
E/flutter (15179): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: No element
E/flutter (15179): #0 List.first (dart:core-patch/growable_array.dart:343:5)
E/flutter (15179): #1 Geocoder2.getDataFromCoordinates (package:geocoder2/src/geocoder2.dart:25:44)

Compatible with OpenStreetMap

I want to migrate from geocoding package to geocoder2 but would like to know if it's compatible with open street map as I am not using Google map. Also is the map key required before using the package? I asked because OpenStreetMap doesn't require a key to work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.