0

Since the arrival of AGM v3.0.0-beta of https://github.com/SebastianM/angular-google-maps/ ( a popular repo) I am quite confused how one could add a legend or MapControl (preferably a legend) using this lib.

So far I have tried to "extend" the base class of AgmMapControl but I don't know how to set the HTML or how to use this via Angular.

Here is my map:

<agm-map *ngIf="activitiesMapData.length > 0"
             [mapTypeId]="user && user.settings ? user.settings.mapSettings.mapType : 'roadmap'"
             (mapTypeIdChange)="changeMapType($event)"
             [gestureHandling]="'cooperative'"
             [scrollwheel]="null"
             [tilt]="45"
             [controlSize]="32"
             [disableDefaultUI]="true"
             [styles]="getStyles(theme)">

I would like to get help on how to create a simple HTML based / Angular based Legend using AGM and add to my map.

Like it's proposed here:

https://developers.google.com/maps/documentation/javascript/adding-a-legend

f.khantsis
  • 3,256
  • 5
  • 50
  • 67
Jimmy Kane
  • 16,223
  • 11
  • 86
  • 117
  • 1
    as you have already found out in our repo, custom controls are not supported at the moment by agm. You can do a PR, but I can't promise how soon it will be published – f.khantsis Jul 25 '20 at 17:59
  • Thanks @f.khantsis I didnt know that to be honest. Maybe there were because I saw the above classed and wondered if I was doing something wrong – Jimmy Kane Jul 25 '20 at 18:01

0 Answers0