kjenney / gmaps-utility-library-dev

Automatically exported from code.google.com/p/gmaps-utility-library-dev
0 stars 0 forks source link

ExtInfoWindow Port to API v3? #216

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is more of a request.  No one is answering my questions elsewhere, and the 
google group is closed, so I will ask here.  Are there any plans to port 
ExtInfoWindow to Google Maps API v3?

Original issue reported on code.google.com by douglass...@earthlink.net on 16 Jan 2013 at 1:52

GoogleCodeExporter commented 9 years ago
Started working on it here:

http://devservices.northcarolina.edu/lcl/ded_gmap/exams/find.php

http://devservices.northcarolina.edu/lcl/ded_gmap/system/themes/asp/js/extinfowi
ndow.js

Original comment by douglass...@gmail.com on 18 Jan 2013 at 6:20

GoogleCodeExporter commented 9 years ago
Ok, seems to be working pretty well now, although a few hacks were needed to 
take care of things missing from v3 of the API.

Original comment by douglass...@gmail.com on 12 Feb 2013 at 7:38

GoogleCodeExporter commented 9 years ago
If the infowindow contains a link, the href is not followed in Chrome, Safari 
and Opera. It seems that the click event is stolen.
Not sure why it was made that way, but I removed it.
l. 239 : var stealEvents = ['mousedown', 'dblclick', 'DOMMouseScroll', 
'onmousewheel', 'drag'];

Original comment by etienne....@gmail.com on 18 Apr 2013 at 12:27

GoogleCodeExporter commented 9 years ago
+ no control is done on the google variable before use.

Original comment by etienne....@gmail.com on 19 Apr 2013 at 8:09

GoogleCodeExporter commented 9 years ago
please explain "no control is done on the google variable before use."

Original comment by douglass...@gmail.com on 1 May 2013 at 3:01

GoogleCodeExporter commented 9 years ago
I see the issue with stealing the click event. however, if I don't do that, and 
it is, for example, a mailto link, then the click goes right through to the map 
after the link is activated and my email client opens a new email message.

when it goes through to the map, the infowindow is closed.

How can this be solved?

Original comment by douglass...@gmail.com on 1 May 2013 at 3:06

GoogleCodeExporter commented 9 years ago
This code no longer seems to be working.  It did in the previous code:

/**
 * Private function to steal mouse click events to prevent it from returning to the map.
 * Without this links in the ExtInfoWindow would not work, and you could click to zoom or drag 
 * the map behind it.
 * @private
 * @param {MouseEvent} e The mouse event caught by this function
 */
ExtInfoWindow.prototype.onClick_ = function(e) {

  if( (navigator.userAgent.toLowerCase().indexOf('msie') != -1  && document.all) || 
                        navigator.userAgent.indexOf('Opera') > -1)  {
    window.event.cancelBubble = true;
    window.event.returnValue = false;
  } else {
    //e.preventDefault();
    e.stopPropagation();
  }
};

Original comment by douglass...@gmail.com on 1 May 2013 at 3:26

GoogleCodeExporter commented 9 years ago
changed the way event handling works so that mouse scroll wheel on InfoWindow 
won't zoom.  newest version here:

http://online.northcarolina.edu/system/themes/asp/js/extinfowindow.js

Original comment by douglass...@gmail.com on 1 May 2013 at 4:54

GoogleCodeExporter commented 9 years ago
click event handling is also working now

Original comment by douglass...@gmail.com on 1 May 2013 at 10:42