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

feat(google-maps): Getting google.maps.Map instance #23856

Merged
merged 1 commit into from
Nov 8, 2021
Merged

feat(google-maps): Getting google.maps.Map instance #23856

merged 1 commit into from
Nov 8, 2021

Conversation

umernaeem217
Copy link
Contributor

Added mapInitialized event which is emitted when the map is initialized and returns the map instance.

For #23703

Added mapInitialized event which is emitted when the map is initialized and returns the map instance.

For #23703
@umernaeem217 umernaeem217 requested a review from a team as a code owner October 28, 2021 19:03
@google-cla google-cla bot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 28, 2021
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release labels Oct 29, 2021
@devversion devversion removed the request for review from a team November 5, 2021 12:56
@amysorto amysorto merged commit 7dbe9a4 into angular:master Nov 8, 2021
@umernaeem217 umernaeem217 deleted the map-initialized-event branch November 8, 2021 17:15
@SheldonHage
Copy link

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

@crisbeto
Copy link
Member

crisbeto commented Dec 1, 2021

You should be able to do just <map-marker [position]="{lat: <some number>, lng: <some number>}"></map-marker>.

@SheldonHage
Copy link

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.

@SheldonHage
Copy link

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.

@julienM77
Copy link

Hey
Small question, will this feature (mapInitialized) be merged in the 12.2.x branch ? I see that it is available in 13.1.x but I have not yet migrated to v13...

@crisbeto
Copy link
Member

We don't port features back to older versions.

@julienM77
Copy link

We don't port features back to older versions.

thank you for your answer

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants