When building a map with user markers, setting the marker to "link" (2) works, but setting them to popup (1) does not work. Debugging what happens show this exception Uncaught TypeError: Object #(some object id) has no method openInfoWindow().

This is thrown in this fragment, near line 117 of marker.js:

        $.get(uri, {}, function (data) {
          obj.rmtcache[marker.rmt] = data;
          marker.marker.openInfoWindowHtml(data);

The marker.marker object does not have such a method.

I fixed the problem in my case by changing the code to use a method similar to the one used when redisplaying from cache instead of fetching via AJAX:

        $.get(uri, {}, function (data) {
          obj.rmtcache[marker.rmt] = data;
          infowindow.setContent(data);
          infowindow.open(obj.map, marker.marker);

Comments

fgm’s picture

Title: User popup not opening, javascript exception - Uncaught TypeError: Object #<Object> has no method openInfoWindow() » User popup not opening, javascript exception - Uncaught TypeError: Object #<Object> has no method openInfoWindowHtml()
Status: Active » Needs review
StatusFileSize
new837 bytes

Suggested quick patch.

podarok’s picture

Version: 6.x-2.0-beta2 » 7.x-2.x-dev
Status: Needs review » Postponed (maintainer needs more info)

before commit this one needs check against latest 7.x dev
please, do it

podarok’s picture

Status: Postponed (maintainer needs more info) » Needs review

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-1989450-by-fgm-fixed-user-popup-not-opening.patch, failed testing.

miccelito’s picture

#1 worked fine for me (I'm using version 6.x-2.0-beta2).

Java console errors:

TypeError: marker.marker.openInfoWindowHtml is not a function
marker.marker.openInfoWindowHtml(data);

and

TypeError: currentMarker.marker.getPoint is not a function
var markerPoint = currentMarker.marker.getPoint();

are gone after doing the change in the marker.js file

Thanks!

Status: Needs work » Needs review
anpolimus’s picture

Assigned: Unassigned » anpolimus
Issue summary: View changes
Issue tags: +dcuacs2015

Status: Needs review » Needs work

The last submitted patch, 1: 0001-Issue-1989450-by-fgm-fixed-user-popup-not-opening.patch, failed testing.

anpolimus’s picture

Status: Needs work » Closed (works as designed)

This code has already implemented to the latest dev branch.
Closing issue.