Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Could not intercept requestAnimationFrame from Google Maps #1024

Closed
@wtubog

Description

@wtubog

Background: Google Maps triggers requestAnimationFrame when zooming in and out of the map and when panning, I want to intercept these requestAnimationFrame via Zone.js to debounce it and may be improve performance on mobile devices...

I created a simple repro code on StackBlitz (please open console to see logs)

The problem here is that I can't seem to intercept the requestAnimationFrame on the onScheduleTask method defined on the ZoneSpec of the created Zone called mapZone (but I'm seeing intercepted events such as setTimeout inside the map when it's being instantiated) ... as you can see on the repro code, I ran the initialization of Google Maps inside the created Zone

I'm newbie on Zone.js, this probably might be a simple problem, but I can't seem to find a solution... what do you think am I missing here? :)

Thanks so much in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions