545 questions
0
votes
0
answers
39
views
Angular Google map doesn't show markers on Android
I use @angular/google-maps for my mobile application. It may sound wild why I don't use capacitor/google-map, first I use this, but I needed to make a custom cluster icon, which is not provided by ...
2
votes
1
answer
258
views
Loading GoogleMaps API in Angular 20 Karma unit tests
Having updated an Angular v19 app to Angular v20, the Google Maps API is not being loaded in the Karma unit tests. All the unit tests on components which serve Google Maps fail with the following ...
1
vote
1
answer
32
views
Angular GoogleMap not setting bounds properly when coming out of hidden state
I have a component which visualize some data in an mat accordion, next to it is a google map which shows the location of each data point. On top of the component I have a dropdown, depending on the ...
0
votes
0
answers
70
views
Angular google map, timing issue when reloading component? How to refactor for reusability?
I work with angular 19 and "@angular/google-maps": "^19.1.2".
I currently have a map component used in a specific usecase which uses a map with advanced markers, the clusterer and ...
0
votes
0
answers
92
views
Cannot click and draw/drag polygon in @angular-google-maps (not @agm/core)
I have this in my angular 18 project. I use "@angular/google-maps": "^18.2.3" for this. In this map component when I do right click I pull down a custom context menu. There I have ...
0
votes
1
answer
343
views
How to get reference to a MapAdvancedMarker in my component
I am using the @angular/google-maps package with several Advanced Markers (since MapMarkers are deprecated):
<google-map
height="400px"
width="750px"
[center]="center&...
1
vote
0
answers
154
views
Unable to use AgmCoreModule with angular 18 standalone component
I am using angular 18 with standalone components.
I have been trying to do google maps and address autocomplete integration with my component.
I have installed the AgmCoreModule and imported in my ...
-1
votes
1
answer
398
views
I get extremely slow performance in Angular Google Maps when I have to load hundreds of markers
I'm rendering around 400 map advanced markers, however, these make my app extremely slow and I can't see anything that could cause this problem.
This is the code I have:
<div class="map-...
-1
votes
1
answer
257
views
Angular google maps don't load the tiles when i build my app, but markers work
In dev mode, my google map component (using angular google maps library, v17) works perfectly fine, i had to create a mapId from google cloud platform because otherwise, it says i can't use markers. ...
-2
votes
1
answer
130
views
Why won't Google maps allow dynamic lat and lon in angular?
I am trying to load some lat and longitudes for a map in angular, for some reason google maps won't allow.
I get the Data back from Firebase when I click a menu button every choice brings back a ...
6
votes
1
answer
4k
views
How to Customize Advanced Marker Pin Elements in @angular/google-maps
I'm working with Angular 17 and @angular/[email protected] and would like to customize the appearance of map-advanced-marker pins. According to the Google Advanced Markers documentation, ...
1
vote
1
answer
1k
views
How to get angular/google-map reference in component the right way
I use @angular/google-maps": "^17.3.5" and angular "^17.3.5"
I try to get a reference to my google-map
<google-map #map mapId="map" height="100%" ...
1
vote
0
answers
430
views
Cannot find type definition file for 'googlemaps'
I am using Angular 16.2.12 for my project. I've installed @angular/google-maps 16.2.12. Because @types/googlemaps is deprecated so i used @types/google.maps 3.53.5 then i got following errors:
Error: ...
0
votes
1
answer
479
views
How to dynamically set angular-google-maps api key using Angular Service?
I'm using @agm/[email protected] and Angular 14.2.10. The api key is provided by the server, so I created an EnvService which has the following method
/**
* get google map api key
* @returns ...
0
votes
1
answer
184
views
how to retrieve coordinates of a Place by query string | google-maps angular
In my Angular 15 application I have imported @angular/google-maps version 15.2.9.
I have a custom typeahead and I managed to use Places API to retrieve suggestions with the following code:
map.service
...
0
votes
1
answer
2k
views
Is agm/core module not supported for angular 16?
I'm using Angular 16. When I tried to use AgmCoreModule it's throwing an error. node_modules/@agm/core/lib/core.module.d.ts:25:22 [ng] 25 export declare class AgmCoreModule { [ng] ...
0
votes
1
answer
405
views
how to get google maps coordinates from country code?
Let's say I have a country code "US", how can I get back the coordinates of the United States of America using Google Map?
4
votes
1
answer
977
views
Angular google-maps and AdvancedMarkerElement
I would like to use AdvancedMarkerElemment in my component using @angular/google-maps
Since AdvancedMarkerElement is not yet supported by @angular/google-maps I need your help to include and use an ...
1
vote
1
answer
55
views
NPM watch error: ReferenceError: _ is not defined at ../node_modules/angular-google-maps/dist/angular-google-maps.js (angular-google-maps.js:1:1)
I'm using Angular and I've restarted mycomputer and in the browser at the console section appeared to me an error:
Unhandled Promise rejection: _ is not defined ; Zone: <root> ; Task: Promise....
0
votes
1
answer
717
views
@angular/google-maps (mapDrag) doesn't work
could you please help me with this, when using the @angular/google-maps library, I tried to use (mapDrag) to call a function when dragging a marker, I used [draggable = true] to be able to drag it but ...
0
votes
1
answer
264
views
How can I get a reference of the sender circle in angular google maps component
When I use circle events in Angular Google Maps component (https://github.com/angular/components/tree/main/src/google-maps), I cannot get a reference to the affected circle instance for retrieving the ...
0
votes
1
answer
217
views
Cannot read properties of undefined (reading 'nativeElement') in angular using agm/core
I am using agm/core for searching places. As guidelines I added required variables and code
Here is my code
import { MapsAPILoader } from '@agm/core';
@ViewChild('search') public searchElementRef: ...
1
vote
2
answers
2k
views
Angular 15 Google Maps updating marker positions in real time
Using @angular/google-maps to create a real time map of public transport using transport for NSW openData.
https://github.com/angular/components/blob/main/src/google-maps/README.md
https://opendata....
2
votes
3
answers
4k
views
Why isn't the angular google-map component recognized by angular even though its module has been added to the app module?
I have added the google maps module to my app.module.ts but it keeps giving me an error.
I suspected the issue might be from the version of the packages I installed. I updated angular to angular 15 (...
0
votes
1
answer
3k
views
Trouble installing @angular/google-maps on angular13
when I tried installing it shows
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]....
1
vote
1
answer
2k
views
@angular/google-maps Marker and Cluster Animation
I'm using Angular's Google Maps library (@angular/google-maps: 13.3.4) and want to animate clusters the same way as markers just when markers are added. This is my code so far:
<google-map height=&...
1
vote
0
answers
185
views
Ionic multiple google maps are greyed on IOS device
in my Ionic 6 application running under capacitor, i'm using angular googleMaps component.
I need to use this map component in several pages of my application.
In my browser, everything works fine.
...
2
votes
1
answer
3k
views
angular 13 and @angular/google-maps
I could not find any article that explains how to use @angular/google-maps in a sub module with lazy-load.
The map loads but when I try to add markers I get this errors
ERROR NullInjectorError: ...
1
vote
1
answer
5k
views
Cannot install Angular Google Maps
I am unable to install Angular Google maps into my Ionic Angular project. I try to run the command npm install @agm/core --save however I get the following error:
code ERESOLVE
npm ERR! ERESOLVE ...
0
votes
0
answers
1k
views
Cypress not able to click on google-maps element (addGeoJson) Angular
I'm having a very hard time trying to figure out how to test google-maps with Cypress
Expected Behavior:
Being able to click in the middle of the screen and trigger the mouseclick
Actual Behavior:
...
0
votes
1
answer
563
views
window.google is undefined with Angular js
I'm using angular-google-chart version 0.0.11 even i tried with 0.1.0 version
it always failed at
window.google.load('visualization', apiConfig.version, settings);
When I debug it, I found window....
1
vote
1
answer
219
views
fail to use forked dependency from npmjs
I need to add a feature to get a list of grouped markers by the marker clusterer of this package:
https://www.npmjs.com/package/@agm/markerclusterer
Currently - there is no such ability and it seems ...
3
votes
2
answers
2k
views
Set height and width of Google Map
I'm trying to use @angular/google-maps and I have a map showing at 500px X 500px and I am trying to set a custom height and width but it seems that the map-container class overrides the style of the ...
1
vote
0
answers
347
views
Why will my cluster not render properly in Google Maps for Angular?
We are having issues with clustering on our Google Map for Angular. This is Angular's own Google Map (@angular/google-map --> https://timdeschryver.dev/blog/google-maps-as-an-angular-component), ...
0
votes
0
answers
1k
views
agm-map' is not a known element
I have created simple angular project in Angular 12. I am trying to add google map search box and map in my project. I have followed this.
For step 4 and step 5 from that link I have created new ...
0
votes
1
answer
437
views
Can't get circle radius after circleRedim in angular2 google-maps
I don't know how to get the circle radius after resize
First approach
.html
<map-circle
(radiusChanged) = circleRedim()
[center]="center"
[options] = circleOptions >
...
6
votes
3
answers
5k
views
Getting google.maps.Map instance from @angular/google-maps
I need to get google.maps.Map. I cannot see official way in docs. But I see that whole component is exportedAs.
But when I use it in template:
<google-map [center]="{lat: mapaLat, lng: mapaLng}...
1
vote
0
answers
527
views
Google Maps Api Cluster really bad performance vs super cluster
I have to display around 15.000 markers on a Google Map.
To avoid performance issues I implemented a clustered solution.
The framework that I'm using is angular12 with @angular/google-maps.
The cose ...
1
vote
0
answers
280
views
Angular Google Maps - Unable to Patch Value using PlaceResult Object on Autocomplete Directive
I am using https://www.npmjs.com/package/@angular-material-extensions/google-maps-autocomplete to add an address autocomplete control on my form. The control successfully provides addresses when the ...
1
vote
0
answers
292
views
add multiple polyline in angular 7 using agm npm package
I am using angular google map(AGM) npm package. following is code
<agm-map
(mapClick)="polyineMapClicked($event)"
[ngStyle]="{ height: '400px' }"
[zoom]=&...
1
vote
1
answer
333
views
Angular Viewchild InfoWindow behaves differently
In my angular google map (not agm) project, the map page html file contains a info window component like this.
<map-info-window #myInfoWindow>
<!-- something here -->
</map-info-...
0
votes
1
answer
3k
views
@angular/google-maps Change marker color
I am using google-maps for Angular, and I can't find how to change the color of the marker. I have different coordinates and I wish to color each one separately.
For now I am using :
const ...
-2
votes
1
answer
296
views
MapDirectionsRenderer in @angular/google-maps
"@angular/animations": "^11.2.14"
"@angular/common": "^11.2.14",
"@angular/compiler": "^11.2.14",
"@angular/core": "^11.2.14&...
2
votes
0
answers
384
views
Waypoint throwing problem when using agm-direction Ionic
I am using agm direction and I am getting this problem in visual studio code:
Type '{ location: { lat: number; lng: number; }; }[]' is not assignable to type 'DirectionsWaypoint[]'.
Type '{ location:...
-2
votes
1
answer
166
views
GoogleMap dragend event on Polygon breaks Material Angular Snackbar
When using the snackbar from within a GoogleMaps listener for dragend on a Polygon,
let polygon = new google.maps.Polygon({
map: this.map.googleMap,
paths: coords.map(c => ({
lat: c....
0
votes
2
answers
1k
views
Removing the blue border sorrounding the angular google map - agm-map
how to remove this blue border around this agm-map
see the pic: https://i.sstatic.net/cIiQd.jpg?
once i click on the map, the blue border disappears!
i've tried with:
agm-map {
height: 465px;
...
1
vote
2
answers
2k
views
agm marker Agm-marker dragEnd event is not returning coordinates
Angular google maps agm marker drag end event not returning coordinates
<agm-map [latitude]="latitude" [longitude]="longitude" [zoom]="zoom">
<agm-marker ...
0
votes
1
answer
1k
views
Angular Google Maps – polyline works on Stackblitz but not locally
I need to wrap a div tag inside of an agm-polyline so it will accommodate both an ngFor and ngIf directive on the same agm-polyline-point tags. Example:
<agm-polyline [strokeColor]="'blue'&...
1
vote
1
answer
2k
views
Angular Google Maps Karma Testing
I updated an Angular project (8 -> 11) and the dependencies. Previously the project used the the @agm/core (https://github.com/SebastianM/angular-google-maps) package, which is not compatible with ...
16
votes
4
answers
28k
views
Trouble getting Angular Google Map AGM to work with Angular 11
I installed agm/core using npm like this:
npm install @agm/core
The following warnings were displayed:
npm WARN @agm/[email protected] requires a peer of @angular/common@^9.1.0 || ^10.0.0 but none is ...