Topic: Angular Google Maps

Fend pro asked 7 years ago


No marker marker is visible? <agm-map [zoom]="15" [latitude]="map.lat" [longitude]="map.lng"style="height: 450px"> <agm-map-marker [latitude]="map.lat" [longitude]="map.lng"></agm-map-marker> </agm-map>

Dawid Adach pro answered 7 years ago


Dear Fend, I just wanted to let you know that we have fixed the issue. The guys from angular2-google-maps which recently renamed project to @agm, refactored names of certain selector names, even their documentation is misleading. SrAxi pointed me in the right direction, however in the current Angular version (4.x), Components cannot have directives I believe. This is the only documentation of the new selectors: https://github.com/SebastianM/angular-google-maps/blob/master/CHANGELOG.md#100-beta0---green-zebra-2017-04-09 Please update code to:
<agm-map [latitude]="lat" [longitude]="lng">
<agm-marker [latitude]="lat" [longitude]="lng"></agm-marker>
</agm-map>
  Note: agm-map-marker should be map-marker. We will update our docs correspondingly.

Edyta Dabrowska free answered 7 years ago


We don't support it at the moment. We will consider adding this in the next release. Meanwhile maybe this can help.

Fend pro answered 7 years ago


Hi, yes I did. The map in general is working ok. I just can't the location marker getting to work.

Edyta Dabrowska free answered 7 years ago


Have you remembered to add your API key like this: @NgModule({ imports: [ AgmCoreModule.forRoot({ apiKey: 'your key here' }) ], }) from here: https://developers.google.com/maps/documentation/javascript/get-api-key?hl=en#key

Fend pro answered 7 years ago


Hi, I use 4.3.1 pro. No I don't get any error, I just can't see the marker sign on screen.

Edyta Dabrowska free answered 7 years ago


Hi, please tell me what version are you using? Is this 'No marker marker is visible?' the error you get?

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags