# Listner Not Found Error on Map Component Drag Past Max Bounds

**URL:** <https://forum.inductiveautomation.com/t/listner-not-found-error-on-map-component-drag-past-max-bounds/97689>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 23, 2024, 7:14pm UTC](https://forum.inductiveautomation.com/t/listner-not-found-error-on-map-component-drag-past-max-bounds/97689 "2024-10-23T19:14:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Hanson](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Matthew\_Hanson](https://forum.inductiveautomation.com/u/Matthew_Hanson)\
**Post date:** [October 23, 2024, 7:14pm UTC](https://forum.inductiveautomation.com/t/listner-not-found-error-on-map-component-drag-past-max-bounds/97689/1 "2024-10-23T19:14:13Z")

</div>

I created a custom tile map of my factory floor. I can pan and zoom in the map component. When I drag the map to the edge of map bounds, I start getting a thousand "listener not found" errors each second causing slow downs and eventual site hangup.

 ![Screenshot 2024-10-23 151131](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/0/a0158b8d6c29b6936486a58a4a1b4c8366ce2bbc.png)

It seems to come from this section of code but I don't know where to go from here.

 ![Screenshot 2024-10-23 151230](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/9/c96a4c82a40e10a693e3d5b848e93b79d8ad06e1.png)

---

<div class="post-metadata">

**Author:** ![nicolas.picaud](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nicolas.picaud](https://forum.inductiveautomation.com/u/nicolas.picaud)\
**Post date:** [August 21, 2026, 9:31am UTC](https://forum.inductiveautomation.com/t/listner-not-found-error-on-map-component-drag-past-max-bounds/97689/2 "2026-08-21T09:31:34Z")

</div>

Hello,

I'm having the same 'listener not found' issue using Ignition 8.1, did you find the solution to your problem ?

The errors seems to affect flyTo and zoom on the map too...

---

<div class="post-metadata">

**Author:** ![augustin.gauchet](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@augustin.gauchet](https://forum.inductiveautomation.com/u/augustin.gauchet)\
**Post date:** [August 24, 2026, 8:58am UTC](https://forum.inductiveautomation.com/t/listner-not-found-error-on-map-component-drag-past-max-bounds/97689/3 "2026-08-24T08:58:58Z")

</div>

Hi,

I have the same issue with tile maps using 8.1

The issue appears to have been fixed in recent Leaflet versions. Does anyone know if this was fixed by a more recent Ignition version ?

---

<div class="post-metadata">

**Author:** ![Matthew\_Hanson](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@Matthew\_Hanson](https://forum.inductiveautomation.com/u/Matthew_Hanson)\
**Post date:** [August 24, 2026, 2:24pm UTC](https://forum.inductiveautomation.com/t/listner-not-found-error-on-map-component-drag-past-max-bounds/97689/4 "2026-08-24T14:24:53Z")

</div>

I got no response and stopped pursuing this feature, no idea if its fixed.

---

<div class="post-metadata">

**Author:** ![nicolas.picaud](https://avatars.discourse-cdn.com/v4/letter/n/3e96dc/32.png) [@nicolas.picaud](https://forum.inductiveautomation.com/u/nicolas.picaud)\
**Post date:** [August 24, 2026, 3:25pm UTC](https://forum.inductiveautomation.com/t/listner-not-found-error-on-map-component-drag-past-max-bounds/97689/5 "2026-08-24T15:25:54Z")

</div>

Thank you for your response!

I ended up using 'onMoveEnd' on the Map component and completely removing the maxBounds, I have no more errors.

If someone encounters this problem, here is a script that I created quickly, it allows the user to exceed limits while creating a "bounce" effect when they do so. It’s not as good or as effective as an integrated limit manager would be, but it works fine for my use case.

Put this on the onMoveEnd event as a Script and add these as customs :

```python
mapLimits : {"maxLat": "XX.XX","maxLng": "XX.XX","minLat": "XX.XX","minLng": "XX.XX","tolerance": "0.001"}

mapMoveGuard : false

```

```python
if self.custom.mapMoveGuard:
		self.custom.mapMoveGuard = False
		return
	
	limits = self.custom.mapLimits
	
	allowedMinLat = float(limits["minLat"])
	allowedMaxLat = float(limits["maxLat"])
	allowedMinLng = float(limits["minLng"])
	allowedMaxLng = float(limits["maxLng"])
	tolerance = float(limits.get("tolerance", 0.001))
	
	b = self.getBounds()
	viewSouth = b["south"]
	viewNorth = b["north"]
	viewWest = b["west"]
	viewEast = b["east"]
	
	if (
		viewSouth >= (allowedMinLat - tolerance) and
		viewNorth <= (allowedMaxLat + tolerance) and
		viewWest >= (allowedMinLng - tolerance) and
		viewEast <= (allowedMaxLng + tolerance)
	):
		return
	
	center = self.getCenter()
	centerLat = center["lat"]
	centerLng = center["lng"]
	
	halfHeight = (viewNorth - viewSouth) / 2.0
	halfWidth = (viewEast - viewWest) / 2.0
	
	minCenterLat = allowedMinLat + halfHeight
	maxCenterLat = allowedMaxLat - halfHeight
	minCenterLng = allowedMinLng + halfWidth
	maxCenterLng = allowedMaxLng - halfWidth
	
	def clamp(value, minValue, maxValue):
		return max(minValue, min(value, maxValue))
	
	if minCenterLat > maxCenterLat:
		newLat = (allowedMinLat + allowedMaxLat) / 2.0
	else:
		newLat = clamp(centerLat, minCenterLat, maxCenterLat)
	
	if minCenterLng > maxCenterLng:
		newLng = (allowedMinLng + allowedMaxLng) / 2.0
	else:
		newLng = clamp(centerLng, minCenterLng, maxCenterLng)
	
	if abs(newLat - centerLat) > tolerance or abs(newLng - centerLng) > tolerance:
		self.custom.mapMoveGuard = True
		zoomPanOptions = {
			"animate": False,
			"duration": 0,
			"easeLinearity": 0,
			"noMoveStart": False
		}
		self.panTo({"lat": newLat, "lng": newLng}, option=zoomPanOptions)

```
