# 07\_Choropleth\_World\_Map - export image from generic javascript view

**URL:** <https://forum.knime.com/t/07-choropleth-world-map-export-image-from-generic-javascript-view/19657>\
**Category:** KNIME Analytics Platform\
**Created:** [November 22, 2019, 12:31pm UTC](https://forum.knime.com/t/07-choropleth-world-map-export-image-from-generic-javascript-view/19657 "2019-11-22T12:31:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rich\_ard](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@Rich\_ard](https://forum.knime.com/u/Rich_ard)\
**Post date:** [November 22, 2019, 12:31pm UTC](https://forum.knime.com/t/07-choropleth-world-map-export-image-from-generic-javascript-view/19657/1 "2019-11-22T12:31:16Z")

</div>

Hello,

Can anyone help with the code needed to get an image out of the example 07\_​Choropleth\_​World\_​Map workflow that I can send to a Birt report (the workflow uses google charts to create the map)? I’m not a coder and so I haven’t a clue where to begin. Any help would be much appreciated.

R.

p.s. I discovered Knime a couple of months ago and it’s AWESOME! Not being a data scientist or coder, my self-taught workflows look like they were built by Heath Robinson but they work.

---

<div class="post-metadata">

**Author:** ![Martyna](https://forum-cdn.knime.com/user_avatar/forum.knime.com/martyna/32/20942_2.png) [@Martyna](https://forum.knime.com/u/Martyna)\
**Post date:** [November 29, 2019, 10:25am UTC](https://forum.knime.com/t/07-choropleth-world-map-export-image-from-generic-javascript-view/19657/2 "2019-11-29T10:25:44Z")

</div>

Hi @Rich_ard

I forwarded this to my colleagues that have experience with the JS node.  
They are currently not available but will come back to you in the next couple of days/next week.

Best,  
Martyna

---

<div class="post-metadata">

**Author:** ![Rich\_ard](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@Rich\_ard](https://forum.knime.com/u/Rich_ard)\
**Post date:** [November 29, 2019, 10:40am UTC](https://forum.knime.com/t/07-choropleth-world-map-export-image-from-generic-javascript-view/19657/3 "2019-11-29T10:40:42Z")

</div>

Hi Martyna,

Thanks so much for following this up.

Richard

---

<div class="post-metadata">

**Author:** ![Rich\_ard](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@Rich\_ard](https://forum.knime.com/u/Rich_ard)\
**Post date:** [December 4, 2019, 1:22pm UTC](https://forum.knime.com/t/07-choropleth-world-map-export-image-from-generic-javascript-view/19657/4 "2019-12-04T13:22:46Z")

</div>

Hello,

Just wondered if there was any advice on this?

Thanks,

Richard

---

<div class="post-metadata">

**Author:** ![Martyna](https://forum-cdn.knime.com/user_avatar/forum.knime.com/martyna/32/20942_2.png) [@Martyna](https://forum.knime.com/u/Martyna)\
**Post date:** [December 18, 2019, 10:02am UTC](https://forum.knime.com/t/07-choropleth-world-map-export-image-from-generic-javascript-view/19657/5 "2019-12-18T10:02:26Z")

</div>

Hi @Rich_ard,

I am sorry you had to wait for that long to get some answers here.

Unfortunately, I don’t have good news. The Maps library used to generate the image doesn’t play nicely with the Apache Commons library we use to parse our SVG images for the image output port. For this example generating an image using the node is not possible.

Sorry for not having better news here!

Best,  
Martyna

---

<div class="post-metadata">

**Author:** ![Rich\_ard](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/r/82dd89/32.png) [@Rich\_ard](https://forum.knime.com/u/Rich_ard)\
**Post date:** [December 19, 2019, 9:34am UTC](https://forum.knime.com/t/07-choropleth-world-map-export-image-from-generic-javascript-view/19657/6 "2019-12-19T09:34:10Z")

</div>

Hi Martyna

That’s a pity, but thank you for looking into it and getting back to me.

Richard

---

<div class="post-metadata">

**Author:** ![wiswedel](https://forum-cdn.knime.com/user_avatar/forum.knime.com/wiswedel/32/28273_2.png) [@wiswedel](https://forum.knime.com/u/wiswedel)\
**Post date:** [February 7, 2021, 7:57pm UTC](https://forum.knime.com/t/07-choropleth-world-map-export-image-from-generic-javascript-view/19657/8 "2021-02-07T19:57:23Z")

</div>

Just ran into this problem myself and tried to understand it better. The SVG generated by the Google Charts API contains XML elements and attributes [not accepted by Batik](https://stackoverflow.com/questions/23996145/java-batik-exception), which is the SVG parser KNIME is using. This, however, can be fixed on the JS side like so:  
`svgElement.querySelectorAll('g').forEach(b=>b.removeAttribute('clip-path'));`

I created a small example, which is available on the [KNIME Hub](https://kni.me/w/TjstdPIcKCL4dOEo).
