-
Notifications
You must be signed in to change notification settings - Fork 31
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Google Maps is now an Angular component #127
Comments
Hello, I have the following error message: Error: src/app/app.component.html:4:56 - error TS2345: Argument of type 'HTMLElement' cannot be assigned to parameter of type 'MapMarker'. 4 [options]="markerOptions" (mapClick)="openInfoWindow(marker)"> src/app/app.component.ts:6:16 |
@LluizSouza This blog post was written on a previous version of the Angular Google Maps component. I hope this helps. |
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY"></script> <<<<<
How to secure the key ? YOUR_API_KEY <<< since this goes to client browser, and can be inspected. |
@vanderson22 the key is always visible, but you can restrict its usage. |
Hi Tim, how are you? Am I missing something? <google-map Best regards. |
It's sad that the Thank you for this article :) |
Is this component obsolete for Angular 15? A small app stopped working in the past week or so. I am assuming something changed with the Google API as I did not change the app. I have now updated the app to angular 15 and cannot get it working. This was my code for adding a number of markers that worked up to recently: for each ... This line throws an error on myMapMarker:
Error: Argument of type '{ Type '{ MapMarker appears to be:
and not
as defined above on this page. What am I missing? Pardon my ignorance, I am relatively new to this ;) Any suggestions appreciated. |
Environment relating to my post above: Angular CLI: 15.2.0 Angular: 15.2.0 Package Version@angular-devkit/architect 0.1502.0 and: "@angular/google-maps": "^15.2.0", |
Hi Tim, thanks, this is great stuff, very useful. As well as working with I am using which works great for displaying the polygons from my database, but there seems to be no equivalent mapClick event. I have tried setting[clickable] to true and adding [click] and [onClick] properties. I have tried the listener events approach but cannot make it work. Do you know if there is a property of that would work when clicked? |
I'm trying to show MapInfoWindow for every marker but stucked with the first info in every single mark. Need help to overcome the problem. <google-map Shop Name: {{ markerPosition.label }}Contact No: {{ markerPosition.title }} Shop Address: {{ markerPosition.address }} |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Google Maps is now an Angular component - Tim Deschryver
The Angular Component pearl-lullaby (v9.0.0-rc.0) release introduces the second official @angular/component component, a Google Maps component. In this post, we take a look at getting started with the Google Maps component.
https://timdeschryver.dev/blog/google-maps-as-an-angular-component
The text was updated successfully, but these errors were encountered: