Loading...
 
Skip to main content

Popups for geolocated tracker items not working properly

Status
Open
Subject
Popups for geolocated tracker items not working properly
Version
27.x
Category
  • Bug
Feature
Trackers
Resolution status
New
Submitted by
lindon
Lastmod by
lindon
Rating
(0)
Description

I have geolocated tracker items showing on a page using the searchlayer plugin within the map plugin. The issue occurs when I click on the map pins to bring up the popups - the first one comes up fine, but as I click other pins the popups seems to cycle through the information from previously clicked pins.

I’m not familiar with this code at all but was able to fix this with a hacky workaround in the tiki-maps-ol3.js file as follows:

At the beginning of the file I declared the following 2 variables:

Copy to clipboard
let $clickedId = “”; let $iterations = 0;

Then I added one line after line 796:

“Fix Id for clicked item"
Copy to clipboard
let type = feature.get("type"), object = feature.get("object”); //line 796 $clickedId = object; //added line to fix the current clicked item

Then I changed line 858 as follows:

“Only load popup for clicked item"
Copy to clipboard
if (type && object) { //original line 858 if (type && object && object == $clickedId) { //changed line 858

Then I added one line after line 1896:

“Count the iterations"
Copy to clipboard
$.fn.loadInfoboxPopup = function (options) { //line 1896 $iterations++; //added line to count the popups that the code iterates through

The at line 1919 I changed the code within the if statement as follows:

“Only process the last iteration which is the current clicked item"
Copy to clipboard
if (options.callback) { $iterations—; if ($iterations === 0) { options.callback.call(options.element, options.event, content); } }




Solution
Workaround
Importance
5
Easy to solve?
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8923
Created
Monday 16 February, 2026 02:40:34 UTC
by lindon
LastModif
Monday 16 February, 2026 03:11:16 UTC


Show PHP error messages