An unexpected stats.js error occurred while attempting to apply custom styles to the map in AngularGoogleMaps,

My experience with Angular Google Maps has been mostly positive, except for one issue that I have encountered.

When attempting to add styles to the map using the styles input attribute, I encounter an error:

js?v=quarterly&callback=agmLazyMapsAPILoader&key=mykey:78 GET https://maps.googleapis.com/maps-api-v3/api/js/39/10/intl/ru_ALL/stats.js net::ERR_ABORTED 500
zone-evergreen.js:659 Unhandled Promise rejection: Could not load "stats". ; Zone: <root> ; Task: Promise.then ; Value: Error: Could not load "stats".
    at HTMLScriptElement.__zone_symbol__ON_PROPERTYerror (js?v=quarterly&callback=agmLazyMapsAPILoader&key=AIzaSyCyzqB8Udgs8s8kthQzK61Sq7Vghu8LiyE:80)
    at HTMLScriptElement.wrapFn (zone-evergreen.js:1218)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Zone.runTask (zone-evergreen.js:167)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:480)
    at invokeTask (zone-evergreen.js:1621)
    at HTMLScriptElement.globalZoneAwareCallback (zone-evergreen.js:1647) Error: Could not load "stats".
    at HTMLScriptElement.__zone_symbol__ON_PROPERTYerror (https://maps.googleapis.com/maps/api/js?v=quarterly&callback=agmLazyMapsAPILoader&key=AIzaSyCyzqB8Udgs8s8kthQzK61Sq7Vghu8LiyE:80:236)
    at HTMLScriptElement.wrapFn (http://localhost:8100/polyfills.js:1231:43)
    at ZoneDelegate.invokeTask (http://localhost:8100/polyfills.js:412:35)
    at Zone.runTask (http://localhost:8100/polyfills.js:180:51)
    at ZoneTask.invokeTask [as invoke] (http://localhost:8100/polyfills.js:493:38)
    at invokeTask (http://localhost:8100/polyfills.js:1634:18)
    at HTMLScriptElement.globalZoneAwareCallback (http://localhost:8100/polyfills.js:1660:21)

Even though the styles are correct and the map is successfully styled, this error continues to occur unexpectedly...

The specified styles are as follows:

  testStyle = [
    {
      elementType: 'geometry',
      stylers: [
        {
          color: '#f5f5f5',
        },
      ],
    },
  ];

Here is how I am implementing the styles:

  <agm-map
    [class.fullscreen]="(view$ | async) === 'map'"
    [disableDefaultUI]="true"
    [zoom]="12"
    [zoomControl]="false"
    [latitude]="56.946285"
    [longitude]="24.105078"
    [fitBounds]="true"
    [styles]="testStyle"
  >
    <agm-marker
      *ngFor="let object of objects$ | async"
      [latitude]="object.point[0]"
      [longitude]="object.point[1]"
      [agmFitBounds]="true"
    ></agm-marker>
  </agm-map>

Interestingly, if I provide empty styles like: testStyle = [];, the error does not occur.

After researching online, I discovered that this issue could be related to AdBlock. However, I have disabled all browser extensions, yet the error persists.

Answer №1

Resolved! The execution of the script was hindered by AdGuard software tool (not a browser extension). This particular program is designed for Macbooks.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Learn how to access tag attributes within the ngIf function in Angular 2

considering this structure <a *ngIf="canAccess()" routerLink="/adminUsers">...</a> <a *ngIf="canAccess()" routerLink="/link2">...</a> <a *ngIf="canAccess()" routerLink="/otherlink">...</a> <a *ngIf="canAccess()" rout ...

Receiving real-time updates every second from the API

I am currently working on an Angular project where I need to continuously make API calls to retrieve information from a service. Specifically, I want the request to be executed every second in order to keep the data updated. While I know that using Obser ...

What are the steps to configure Angular to run with https instead of the default http protocol?

Typically, Angular applications run on http by default (for example, on http://localhost:4200). Is there a way to switch it from http to https? ...

Error TS7053 occurs when an element is given an 'any' type because a 'string' expression is being used to index an 'Object' type

When attempting to post data directly using templateDrivenForm and retrieve data from Firebase, I encountered the following type error message. Here are the relevant parts of my code: // Posting data directly using submitButton from templateDrivenForm onC ...

Bug in auto compilation in Typescript within the Visual Studios 2015

Currently, I am utilizing Visual Studio Pro 2015 with auto compile enabled on save feature. The issue arises in the compiled js file when an error occurs within the typescript __extends function. Specifically, it states 'Cannot read property prototyp ...

Angular location services

I'm experiencing some difficulties with the geolocation feature. It works fine when the user clicks allow, but there's an issue when using If else. If the user clicks deny, it doesn't insert into the else block. You can check out this DEMO f ...

How to Deactivate FormGroup controls in Angular2 Reactive FormModule

In my Angular2 project, I am utilizing the Reactive FormsModule. At this juncture, I am pondering on how to efficiently disable all of the controls within the FormGroup. While the readOnly property can be applied to individual controls, this approach may ...

What is the best way to add animation to make components slide in a certain direction?

I am in the process of creating a personal website, where each section (such as Home, About, Portfolio, and Contact) is treated as a separate component. Instead of simply redirecting to a new component when clicking on a section link (like Contact), I wan ...

A guide on using hyperlinks to scroll to a targeted position in an Angular application

Is there a way to implement scrolling to a specific position in Angular using hyperlinks? In HTML, it can be implemented like this: <a href="#google"></a> <div id="google"></div> Can anyone provide guidance on h ...

Limiting the character input in ion-textarea within Ionic 2: A step-by-step guide

In my Ionic 2 application, I need to limit user comments to less than 500 characters in a text area. What is the best way to implement this restriction? ...

Tips for maintaining the active state of an item within a component that loops through a dataset

I am working with an array of objects (specifically, posts represented as strings) and I am looking to be able to edit each one individually. However, I am encountering an issue where clicking on the edit button triggers editing for all posts at once: co ...

Unable to bind to property as it is not recognized as a valid attribute of the selector component

I have a situation where I need to pass a variable from one component to another using @input. Here is my parent component : @Component({ selector: 'aze', templateUrl: './aze.component.html', styleUrls: [('./aze.compo ...

Creating a return type in TypeScript for a React Higher Order Component that is compatible with a

Currently utilizing React Native paired with TypeScript. Developed a HOC that functions as a decorator to add a badge to components: import React, { Component, ComponentClass, ReactNode } from "react"; import { Badge, BadgeProps } from "../Badge"; functi ...

The implementation of useState is not functioning properly when used within a parent useState function

I am currently working with a Ticket child class where I set the total amount after changing the number of tickets. The issue I am encountering is that the setNumber function doesn't seem to work properly unless the setTotal function is commented out. ...

The variable "$" cannot be found within the current context - encountering TypeScript and jQuery within a module

Whenever I attempt to utilize jQuery within a class or module, I encounter an error: /// <reference path="../jquery.d.ts" /> element: jQuery; // all is good elementou: $; // all is fine class buggers{ private element: jQuery; // The nam ...

What is the best way to divide two ranges that are intersecting?

Seeking a method to divide two overlapping ranges when they intersect. This is my current progress using typescript, type Range = { start: number; end: number; }; function splitOverlap(a: Range, b: Range): Range[][] { let result = []; const inters ...

Exploring the Power of Modules in NestJS

Having trouble with this error - anyone know why? [Nest] 556 - 2020-06-10 18:52:55 [ExceptionHandler] Nest can't resolve dependencies of the JwtService (?). Check that JWT_MODULE_OPTIONS at index [0] is available in the JwtModule context. Possib ...

Tips for invoking a function from one React component to another component

Currently, I am working on two components: one is Game and the other is PickWinner. The Game component serves as the parent component, from which I need to call the pickWinner function in the PickWinner component. Specifically, I want to trigger the startP ...

Encountering the "Not all code paths return a value" TypeScript error when attempting to manipulate a response before returning it, however, returning the response directly works without any issues

Encountering an issue where manipulating/process response and return triggers an error in TypeScript with the message "Not all code paths return a value.". Data is fetched from a backend API using RxJS lastValueFrom operator, along with lodash functions as ...

Can you explain the significance of the colon in this context?

Upon reviewing some SearchKit code snippets (composed with react/jsx and es2015), I came across the following line in a jsx file: const source:any = _.extend({}, result._source, result.highlight) I am curious about the purpose or significance of the colo ...