Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

➕ Add support for Places API #4

Open
RobertVogt opened this issue Dec 16, 2021 · 3 comments
Open

➕ Add support for Places API #4

RobertVogt opened this issue Dec 16, 2021 · 3 comments
Assignees
Labels
➕ Feature A feature request or an idea

Comments

@RobertVogt
Copy link

Topic
How to use Google places with examples.

What's Missing
An example with documentation of how to enable looking up an address or place with Google places

Existing Docs
The current documentation only seems to cover point to point directions.

@RobertVogt RobertVogt added the 📃 Documentation A documentation suggestion or request label Dec 16, 2021
@BeSpunky
Copy link
Owner

BeSpunky commented Dec 16, 2021

The library currently doesn't wrap the Places API, but it is still accessible through native API.
Here's how:

Places API are definitely part of the library's roadmap and will include some very cool features. Until these are implemented, the following is the way to go...

  1. Make sure you include the Places library when loading Google Maps. If you're manually specifying the url in your GoogleMapsModule.forRoot(), add the places library as mentioned in the native docs.
    If you're using the config object, specify it using the libraries key:
...
import { GoogleMapsLibrary, GoogleMapsModule } from '@bespunky/angular-google-maps/async';

@NgModule({
    ...
    imports: [
        ...
        GoogleMapsModule.forRoot({ apiUrl: { key: 'YOUR_MAPS_API_KEY', libraries: [GoogleMapsLibrary.Places] } })
    ]
})
export class AppModule { }
  1. Use places API as you would without the library, by accessing the google.maps.places namespace, as mentioned in the native docs.

@RobertVogt Thank you for adding this issue. Converting this to a feature request...

@BeSpunky BeSpunky added ➕ Feature A feature request or an idea and removed 📃 Documentation A documentation suggestion or request labels Dec 16, 2021
@BeSpunky BeSpunky changed the title Documentation for google places📃 ➕ Add support for Places API Dec 16, 2021
@RobertVogt
Copy link
Author

Thank you and thanks for this library and your responsiveness...this library is SOOO much better than AGM or the "official" Google maps library.

@BeSpunky
Copy link
Owner

Such kind words... Much appreciated. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
➕ Feature A feature request or an idea
Projects
None yet
Development

No branches or pull requests

2 participants