question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

agm-map not render in subcomponent

See original GitHub issue

I have a section in my page this toggelt and in this page a have a AGM that not rendering? What is the problem ?

I only have this in my sub component:

<agm-map [latitude]="56" [longitude]="10"> </agm-map>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13

github_iconTop GitHub Comments

16reactions
mitul69commented, Aug 11, 2017

Hi, Import following in you component.ts

import { AgmMap } from '@agm/core';

Then before your construction get ViewChild like bellow.

@ViewChild(AgmMap)
public agmMap: AgmMap

And when you show your section then called resize trigger like.

this.agmMap.triggerResize();

10reactions
EugeneSnihovskycommented, Dec 11, 2017

@sam08153 I solved this problem by adding height to component

agm-map {
    height: 300px;
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

agm-map not render in subcomponent · Issue #1101 - GitHub
I have a section in my page this toggelt and in this page a have a AGM that not rendering? What is the...
Read more >
Nested angular google maps components don't render
First of all, I you are working under the Angular ecosystem, I would recommend you to use ng-content and explote all its features....
Read more >
Nested angular google maps components don't render - Morioh
Here is the v-map-plots sub-component ... Then render both the agm-map and agm-markers in the v-map component using the data from the directives....
Read more >
AgmMap - @agm/core
AgmMap renders a Google Map. Important note: To be able see a map in the browser, you have to define a height for...
Read more >
SebastianM/angular2-google-maps - Gitter
I've opened an issue for the problem that the marker-clusters don't work together ... can someone points me a working implementation on a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found