# Putting a customized map image in a report

**URL:** <https://forum.inductiveautomation.com/t/putting-a-customized-map-image-in-a-report/99747>\
**Category:** Ignition\
**Tags:** reporting, perspective\
**Created:** [December 12, 2024, 1:43pm UTC](https://forum.inductiveautomation.com/t/putting-a-customized-map-image-in-a-report/99747 "2024-12-12T13:43:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_Engsberg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sam_engsberg/32/37540_2.png) [@Sam\_Engsberg](https://forum.inductiveautomation.com/u/Sam_Engsberg)\
**Post date:** [December 12, 2024, 1:43pm UTC](https://forum.inductiveautomation.com/t/putting-a-customized-map-image-in-a-report/99747/1 "2024-12-12T13:43:10Z")

</div>

Hey! I have a UDT that represents a traveling asset. It's occasionally updated with lat/lon tags logged historically across the day if it moves. We plan non renting these assets and want to provide a daily report to our customer on where the asset went across the day.

On a perspective page, it's pretty simple to draw a marker and maybe a polyline path to show the way it took to get there. On a Report, though, it looks like a different beast since we're limited to Images (to my understanding).

Has anyone integrated maps into reports at all and done anything fancy with it? I'm still getting comfortable with the reporting module and figuring things out, so any advice might be appreciated!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 12, 2024, 3:06pm UTC](https://forum.inductiveautomation.com/t/putting-a-customized-map-image-in-a-report/99747/2 "2024-12-12T15:06:32Z")

</div>

Consider using a script data source in your report to "draw" into an image buffer and deliver a dataset with the encoded PNG bytes. Java's `BufferedImage` can provide a `Graphics2D` context into which you can "draw" just like Vision's Paintable Canvas.

---

<div class="post-metadata">

**Author:** ![Sam\_Engsberg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sam_engsberg/32/37540_2.png) [@Sam\_Engsberg](https://forum.inductiveautomation.com/u/Sam_Engsberg)\
**Post date:** [December 12, 2024, 8:00pm UTC](https://forum.inductiveautomation.com/t/putting-a-customized-map-image-in-a-report/99747/3 "2024-12-12T20:00:56Z")

</div>

I think that makes sense. What would you consider using as a source for the image buffer data? It looks like most maps have an api that would return a png or something to that effect. I think that would be the most straightforward, but I don't think if any of the stuff in perspective is at all accessible from a gateway script. I could be surprised though.

Just trying to leverage the work I've already done in mapping out these things and where they go.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 12, 2024, 8:16pm UTC](https://forum.inductiveautomation.com/t/putting-a-customized-map-image-in-a-report/99747/4 "2024-12-12T20:16:13Z")

</div>

> [@Sam\_Engsberg](#):
>
> What would you consider using as a source for the image buffer data? It looks like most maps have an api that would return a png or something to that effect.

Yes, tile servers cough up images that fit regular coordinate ranges at specific zoom levels. Your code would need to retrieve the ones you need, paint them into your custom Graphics2D, then paint the lines and icons you want for the actual path.

---

<div class="post-metadata">

**Author:** ![Sam\_Engsberg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sam_engsberg/32/37540_2.png) [@Sam\_Engsberg](https://forum.inductiveautomation.com/u/Sam_Engsberg)\
**Post date:** [December 12, 2024, 8:36pm UTC](https://forum.inductiveautomation.com/t/putting-a-customized-map-image-in-a-report/99747/5 "2024-12-12T20:36:34Z")

</div>

That works as a starting point. I'll make an update if there's some useful nuggets worth posting out of the whole ordeal. Thanks a bunch Phil!
