Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headless Cypress fails to render Google Maps with Map ID #6

Open
masakudamatsu opened this issue Aug 15, 2021 · 1 comment
Open

Headless Cypress fails to render Google Maps with Map ID #6

masakudamatsu opened this issue Aug 15, 2021 · 1 comment

Comments

@masakudamatsu
Copy link
Owner

With Map ID specified, Google Maps API appears to use WebGL, as one of the requested JS scripts is called webgl.js (which doesn't get requested when the default map style is used).

Headless Chromium, used with cypress run, appears to be known to fail with WebGL

For MapBox, adding an option preserveDrawingBuffer: true seems to be a solution.

What is the equivalent option for Google Maps?

cf. How to save the canvas image as a PNG with Cypress: https://glebbahmutov.com/blog/canvas-testing/#saving-the-canvas

@masakudamatsu
Copy link
Owner Author

We've found a temporary solution: choose raster, not vector, in the settings for a Map ID.

But this comes at the cost of performance, it seems.

  • "The vector map is the same Google map your users are familiar with using, and offers a number of advantages over the default raster tile map, most notably the sharpness of vector-based images, and the addition of 3D buildings at close zoom levels. The vector map also supports some new features, such as the ability to add 3D content with WebGL Overlay View, programmatic tilt and heading control, enhanced camera control, and fractional zoom for smoother zooming." (source, emphasis mine)

When released, we should switch to the vector map.

@masakudamatsu masakudamatsu added the wontfix This will not be worked on label Nov 3, 2021
@masakudamatsu masakudamatsu added Cypress google maps and removed wontfix This will not be worked on labels Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant