Questions tagged [agm]

AGM is a component library for including google maps in your Angular application. All usage problems with this library can and should be tagged with this tag. If it's an obvious bug, or a feature request, it belongs in our github issues.

AGM provides several Components and Directives. Here are some of them:

  • <agm-map> represents the actual map
  • <agm-marker> represents a marker on the map
  • <agm-polyline> represents a polyline

Full documentation is available on our website, angular-maps.com. See also github project page

64 questions
0
votes
1 answer

How to draw my polygon with Angular Google Map?

I'm using on my angular project this version of Angular Google Maps "@agm/core": "1.0.0-beta.2" . My concern is about how to re-draw the polygon I have drawn on my google Map, I'm storing the latitude and longitude, How can I redraw my polygon ? …
Alexis
  • 19
  • 7
0
votes
1 answer

Updating address fields with matGoogleMapsAutocomplete when dragging map marker

I am trying to implement google maps in my project using agmCore npm module. So when i search an address in input box with matGoogleMapsAutocomplete directive. The map cordinates are updated too, and the marker is moved in the map, along with…
0
votes
1 answer

Importing MouseEvent from @agm/core

I want to add markers on a Google map in angular using agm module. I've found an implementation of how to do it using the map mapClick event. But I can't import MouseEvent from @agm/core. VsCode says the module doesn't have such exported member.…
shellking4
  • 109
  • 3
  • 12
0
votes
1 answer

agm-snazzy-info-window displays at random positions

I'm working with "@agm/core": "^1.0.0-beta.7", "@agm/snazzy-info-window": "^3.0.0-beta.0", "agm-direction": "^0.8.6", "snazzy-info-window": "^1.1.1" And I'm trying to display agm-snazzy-info-window, on marker click. my stackblitz project But it's…
0
votes
1 answer

Getting error while build Angular google maps(AGM)

My angular application is failing to create a prod build. I have used AGM(angular google maps). I had followed every step: Installing "@agm/core": "^3.0.0-beta.0" import { AgmCoreModule } from '@agm/core'; AgmCoreModule.forRoot({ apiKey:…
Atul Verma
  • 361
  • 8
  • 22
0
votes
0 answers

How to add a legend to Google Maps with AGM

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…
Jimmy Kane
  • 16,223
  • 11
  • 86
  • 117
0
votes
1 answer

How to change content inside of info window for different markers?

I am working with angular using the AGM (angular google maps) library. I can't figure out how to have the info window content be different for each marker. I want each marker to have its own information to pop up. Here is my component.html :
user12150264
0
votes
1 answer

agm-polygon not updating when additional points are added

Edit: I added a stackblitz for this. It is my first so I hope it works. https://stackblitz.com/edit/angular-dlabgk I've been using google maps for several years and recently migrating every to AgmMaps. Recently I've seen a few questions about…
xsoftie
  • 116
  • 2
  • 10
0
votes
0 answers

Angular 8, agm api, WARNING in ./node_modules/@agm/core/fesm5/agm-core.js 4538:34-52

I am currently working on a project in angular 8. I was attempting to set up a Google maps API and completed: 1.maps.service.ts 2.app.module.ts 3.app.component.ts 4.app.component.html the errors I'm getting are: WARNING in…
zolk
  • 1
  • 1
0
votes
1 answer

agm-map on a non-active ngb-tab using fitbounds with GeoJson

I'm trying to get an agm-map to show on a second tab of an ngb-tabset, and to fitbounds around the geojson that gets loaded. Here is a stackblitz with the map on the first tab - it works fine, apart from maybe the first load, when 'google is…
Sean
  • 14,359
  • 13
  • 74
  • 124
0
votes
2 answers

Google maps autocomplete works fine while AGM maps Fails to get load even after providing a apiKey

[![`I am able to get google place autocomplete response but fail to load google maps even after enabling all the apis from google console apikey Thanks in advance `]1]1
Suraj Mohata
  • 106
  • 1
  • 5
0
votes
1 answer

Angular AGM draw polygon on marker click

I am using angular agm and need to draw a polygon after clicking on a marker.
uru917
  • 91
  • 13
0
votes
1 answer

Get distance of each country in Google Maps (Angular)

I use AgmCoreModule and AgmDirectionModule in my Angular project. I want to draw a route between points A, B, C which goes through different countries. I want to know how many kilometers of route are in each country separately. Is it possible? Or…
napster993
  • 165
  • 3
  • 10
-1
votes
1 answer

How to set auto zoom in angular google map (AGM)

How to set auto-zoom in angular google map (AGM), that is based on the address entered it should change zoom level automatically, for example, if I entered the country it should show the overall country map when I am entering a particular street or…
Rajesh
  • 17
  • 5
-2
votes
1 answer

How do I assign value.lng to [latitude] and [longitude]?

image when choosing a city from the list, I want to transfer the longitude and latitude to the map
Town/Settlement