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

domtoimage doesn't work on vector layer #477

Open
3 tasks done
nlafleur opened this issue Apr 12, 2024 · 0 comments
Open
3 tasks done

domtoimage doesn't work on vector layer #477

nlafleur opened this issue Apr 12, 2024 · 0 comments

Comments

@nlafleur
Copy link

nlafleur commented Apr 12, 2024

I am using domtoimage.toPng to create a screenshot of my application.
In this application I am using the "VectorBasemapLayer" by "react-esri-leaflet", but the vector baselayers are not shown on the .png.

I've also tried different domtoimage methods (.toJpeg, .toSvg)

Here is a simple jsfiddle, which creates an image based of a node, and renders it below in the "result" div.
jsfiddle

For now, I have a workaround, I have a image baselayer active, which is rendered below the vectorbaselayer, so once the screenshot is taken, it shows the image baselayer.
This is not ideal since these baselayers can differ.

Expected behavior

Vector baselayers should visible in result.
Windows screenshot of the map.
image

domtoimage.toPng, without my workaround:
frmis_yemen_screenshot_12032024 (4)

domtoimage.toPng, with my workaround:
frmis_yemen_screenshot_12032024 (3)

Library version

esri-leaflet: "3.0.12",
esri-leaflet-vector: "4.2.3",
leaflet: "1.9.4",
react-esri-leaflet: "2.0.1",
react-leaflet: "4.2.1",

Browsers

  • Chrome 49+
  • Firefox 45+
  • Edge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant