Click fail on polyline googlemap

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
juanyves

Click fail on polyline googlemap

Unread post by juanyves » 2019-11-04, 15:43

With that code on the page http://senderosdelagomera.com/buildRutas.php?lang=en
google.maps.event.addListener(p, 'click', function() {
alert('OK');
});
nothing happen and no error registered.
It seems that this behavior is not recognized by Pale Moon. It's works fine in Firefox, Opera, Google Chrome & Edge.
In the page http://senderosdelagomera.com/buildRutas.php?lang=en mouse over the poly-line open an alert and clicking on the line, it open a div with more information. "mouseover" and "mouseout" work fine but not "click"

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Click fail on polyline googlemap

Unread post by Moonchild » 2019-11-04, 16:16

Clicking on the routes spawns a console error:

Code: Select all

17:14:51.796 ReferenceError: event is not defined 1 buildRtas.js:165:3
	setPolyline/< http://senderosdelagomera.com/.js/buildRtas.js:165:3
	se.prototype.j https://maps.googleapis.com/maps/api/js:181:287
	_.N.trigger https://maps.googleapis.com/maps/api/js:178:155
	kY.prototype.handleEvent https://maps.googleapis.com/maps-api-v3/api/js/38/10/poly.js:100:181
	pv https://maps.googleapis.com/maps-api-v3/api/js/38/10/map.js:23:119
	mv https://maps.googleapis.com/maps-api-v3/api/js/38/10/map.js:21:315
	onClick https://maps.googleapis.com/maps-api-v3/api/js/38/10/map.js:20:382
	_.t.onClick https://maps.googleapis.com/maps-api-v3/api/js/38/10/common.js:146:262
	ip/this.H< https://maps.googleapis.com/maps-api-v3/api/js/38/10/common.js:64:456
Examining the error:

Code: Select all

	google.maps.event.addListener(p, 'click', function() {
		getInfoTramo(t,event); <** Error
	});
The "event" passed into getInfoTramo does not exist in your namespace. You might need to call it with the full qualifier.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked