# Vision Map Component not painting tiles

**URL:** <https://forum.inductiveautomation.com/t/vision-map-component-not-painting-tiles/70838>\
**Category:** Ignition\
**Tags:** perspective, vision\
**Created:** [March 9, 2023, 3:32pm UTC](https://forum.inductiveautomation.com/t/vision-map-component-not-painting-tiles/70838 "2023-03-09T15:32:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Gibbs](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mike_gibbs/32/44636_2.png) [@Mike\_Gibbs](https://forum.inductiveautomation.com/u/Mike_Gibbs)\
**Post date:** [March 9, 2023, 3:32pm UTC](https://forum.inductiveautomation.com/t/vision-map-component-not-painting-tiles/70838/1 "2023-03-09T15:32:33Z")

</div>

I am building a tool in Vision that lists non active assets (data age \> 15min) in a power table. Once this table is populated, the user can click a row to select an asset. On click, two things (are supposed to) happen. Firstly, the last reported latitude and longitude of the asset are written to a memory tag. This tag is used to facilitate a "Send to google maps" button that allows technicians to easily navigate to a non-reporting asset that they are potentially not familiar with. This functionality works fine. The second bit of functionality (the one that is giving me issues) is passing these coordinates into a sibling Map Component. This is done via the onMouseClick extension function of the power table.

`
latitude = float(self.data.getValueAt(rowIndex, 'Latitude'))
longitude = float(self.data.getValueAt(rowIndex, 'Longitude'))
name = str(self.data.getValueAt(rowIndex, 'assetname'))
zoom = 3
label = "'" + name + "'"
icon = "'MapPanel/lightblue.png'"
hover = "'MapPanel/shadow-pink.png'"
headers = ['Name', 'Latitude', 'Longitude', 'Label Expression', 'Icon Expression', 'Hover Expression']
data = [[name, latitude, longitude, label, icon, hover]]
dataset = system.dataset.toDataSet(headers,data)
self.parent.getComponent('Map Panel').dataPoints = dataset
`

`system.tag.writeBlocking(['[default]ReliabilityTags/NonActiveDataset'],[dataset])
NAmap = self.parent.getComponent('Map Panel')
NAmap.setZoom(zoom)
NAmap.setGpsLocation(latitude, longitude)
NAmap.forceRedraw()
`

I am not super new to Ignition (~2yrs in Perspective), but I am very new to Vision, so I borrowed this code from another part of the project with similar functionality as I haven't found much in-depth information on the Vision Map Component. The strange thing is, it works on the other component, and it seems to work here as far as placing a pin on the map and centering the map on the pin at the appropriate zoom level. The issue I'm having is that the Painted-Tilescount stays at 0 on my map, and I wind up with a pin in the middle of a gray canvas. The other map (where I got the code) renders fine. I have ensured that all of the properties of my Map Component match the properties of the functional Map Component, but still no luck.

I feel like this is probably one of those simple things that I'm going to laugh at myself for once I find the solution, but for the time being, I'm stuck and dwelling on how easily I've accomplished similar functionality in Perspective at my previous gig. 😂

**TLDR:** My Vision Map component isn't painting tiles, and I included a bunch of potentially unnecessary info on the chance that it is more necessary than I think.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 9, 2023, 3:50pm UTC](https://forum.inductiveautomation.com/t/vision-map-component-not-painting-tiles/70838/2 "2023-03-09T15:50:18Z")

</div>

The map component in Vision is provided by a third party module (Kymera Systems, possibly?) - you'll probably get more information about what the component expects from them.

I don't see anything obviously wrong with your script. You can also check the output console in the designer to see if there are any errors being thrown when this script runs.

---

<div class="post-metadata">

**Author:** ![Mike\_Gibbs](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mike_gibbs/32/44636_2.png) [@Mike\_Gibbs](https://forum.inductiveautomation.com/u/Mike_Gibbs)\
**Post date:** [March 9, 2023, 5:41pm UTC](https://forum.inductiveautomation.com/t/vision-map-component-not-painting-tiles/70838/3 "2023-03-09T17:41:39Z")

</div>

Thank you, sir.

I'll look into Kymera and see if that's where it came from. I had a feeling it came from somewhere, but wasn't sure where to start looking. When I get it solved, I'll post solution here for posterity.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 9, 2023, 5:43pm UTC](https://forum.inductiveautomation.com/t/vision-map-component-not-painting-tiles/70838/4 "2023-03-09T17:43:01Z")

</div>

Again, educated guess, but yeah, it's probably Kymera:

> **[Kymera Systems Inc – IIoT Solutions - Map Panel Module](https://www.kymerasystems.com/kymera-map-panel-module/)**
>
> Map Panel Module from Kymera Systems Inc - innovative, stable and secure solutions to a wide range of customers in fields...

---

<div class="post-metadata">

**Author:** ![Mike\_Gibbs](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mike_gibbs/32/44636_2.png) [@Mike\_Gibbs](https://forum.inductiveautomation.com/u/Mike_Gibbs)\
**Post date:** [March 9, 2023, 7:27pm UTC](https://forum.inductiveautomation.com/t/vision-map-component-not-painting-tiles/70838/5 "2023-03-09T19:27:57Z")

</div>

It WAS Kymera. The fix was to add a layer and specify a tile server. Not sure if there is just no longer a default tile server or if there is and it is currently experiencing issues. In any case, an example fix for my use case using a Google server would be to add

`NAmap.getTileServer().addLayer(1.0, "s", "google") #Earth Mode `

prior to the re-draw.

Thanks for the quick response and pointing me in the right direction. It was definitely and easy fix once I had the documentation from Kymera.
