Can't bind to 'latitude' since it isn't a known property of 'agm-map'

This error occurs only when you have a child module for the components where you are implementing the map, So you need to add that module in your child module too without forRoot()

app.module.ts

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

@NgModule({
 imports: [
    AgmCoreModule.forRoot({
      apiKey: ''
   })
  ]
})

child.module.ts

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

@NgModule({
 imports: [
    AgmCoreModule
  ]
})

This will work fine because now the child module has AgmCoreModule


I resolved my issue thanks to @developer033 I had imported Angular Google Maps into my app.module but it needed to be in main.module instead where I am actually consuming it via a component.


thanks to plotoshas' answer in issues 71 you have to harness angular 2 CUSTOM_ELEMENTS_SCHEMA by the following way :

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

// ...

@NgModule({
  // ...
  schemas:  [ CUSTOM_ELEMENTS_SCHEMA ]
})
export class AppModule { }