feat(map-info-window): Set Content Dynamically
See original GitHub issueFeature Description
For it to be posible to set data to each marker placed on the google-map.
Use Case
Referencing a well described previous issue with a similar use case as mine:
Hello, is it possible to have a custom info window with data for each marker? I am using markers for each position of products and on the window I want to show some of the products data. The API allows to set content on the infoWindow reference by setting content for each marker, so I tried to set the content before I open it but on this component we can only getContent() there is no setContent() function. Thanks!
_Originally posted by @ourabio in https://github.com/angular/components/pull/19378#issuecomment-634063771_
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Dynamic content in google maps api v3 info windows on ...
I have the below js that implements a google map with a looped through set of custom markers. I need each ...
Read more >Info Window | Maps JavaScript API - Google Developers
Content to display in the InfoWindow. This can be an HTML element, a plain-text string, or a string containing HTML. The InfoWindow will...
Read more >Switching dynamically between infoWindow / Popup i...
//Change the content only if do not want to change the appearance of infoWindow. map.infoWindow.setContent("<div>I am no where</div>");.
Read more >Query and immediately open info window - ArcGIS Developers
The function formats the InfoWindow, displays a graphic of the feature using map.graphics.add() , and shows the InfoWindow immediately using the map.infoWindow.
Read more >Using the attribute inspector | ArcGIS API for JavaScript 3.29
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> ... //Symbolize features by W/L record ... map.infoWindow.on("hide", function() {
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If you’re doing exactly the same as the example, it’s probably because the reference inside the
openInfoWindowis usingViewChildwhich picks up the first window in the view. Here’s how you can do it: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.