feat(google-maps): Getting google.maps.Map instance#23856
feat(google-maps): Getting google.maps.Map instance#23856amysorto merged 1 commit intoangular:masterfrom umernaeem217:map-initialized-event
Conversation
Added mapInitialized event which is emitted when the map is initialized and returns the map instance. For #23703
|
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