-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
feat(google-maps): Getting google.maps.Map instance #23856
Conversation
Added mapInitialized event which is emitted when the map is initialized and returns the map instance. For #23703
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Apologies if this is the wrong context for this request. Is it possible to get a simple example for placing a map marker directly from within a component versus a mouse click event from the map? It is not obvious how to initialize a LatLng object from within the component; the examples pull the LatLng directly off the mouse event. thanks |
You should be able to do just |
Thanks crisbeto. I did try that example before asking my question; this aspect is straightforward. What I am unable to do is a full cycle of geocode request --> map marker. If I use the example for placing a map within the component the map appears. If I use the example for placing a map marker using the click example, this too works. I can also set a component variable to a latlng json string and that too works. However there is an async step of going to the geocoding service and successfully getting latlng and setting that value to a component variable, the map doesn't appear at all. I am just thinking an example with this use case would be helpful. I know there is an async-related issue here but I can't quite get it working. |
Well, so I did get it working just now...moments after I sent the above. So if someone would like the working example I can provide it. |
Hey |
We don't port features back to older versions. |
thank you for your answer |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Added mapInitialized event which is emitted when the map is initialized and returns the map instance.
For #23703