Comments (12)
We solved this by replacing this line:
--------------------------------------
google.maps.event.addDomListener(closeImg, 'click', removeInfoBox(this));
--------------------------------------
With the following:
function stealClick_(e) {
if(navigator.userAgent.toLowerCase().indexOf('msie') != -1 && document.all) {
window.event.cancelBubble = true;
window.event.returnValue = false;
} else {
e.stopPropagation();
}
}
google.maps.event.addDomListener(closeImg, 'click', removeInfoBox(this));
google.maps.event.addDomListener(contentDiv, 'mousedown', stealClick_);
Original comment by [email protected]
on 2 Jul 2010 at 12:41
from google-maps-utility-library-v3.
I'm sorry, but I can't find the line
google.maps.event.addDomListener(closeImg, 'click', removeInfoBox(this));
in the source code of infobox.js
Which source file are you using?
Original comment by [email protected]
on 3 Jul 2010 at 5:34
from google-maps-utility-library-v3.
We were referring to the code found in the online demo:
http://gmaps-samples-v3.googlecode.com/svn/trunk/infowindow_custom/infowindow-cu
stom.html
Original comment by [email protected]
on 4 Jul 2010 at 6:09
from google-maps-utility-library-v3.
has this issue been resolved?
I have been trying to just add:
map.setOptions({draggable:false, scrollwheel:false});
when the infobox is opened.
Original comment by [email protected]
on 10 Jul 2010 at 5:41
from google-maps-utility-library-v3.
The solution above listed on Jul 02, 2010 worked for us...
Have you tried to implement this change?
Original comment by [email protected]
on 11 Jul 2010 at 2:33
from google-maps-utility-library-v3.
yes, I tried, but that code snippet is not in the latest release of the infobox
code within this library.
Take a look at the official release:
http://google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.0.2/
Original comment by [email protected]
on 11 Jul 2010 at 2:59
from google-maps-utility-library-v3.
A slightly related problem is using the scroll wheel - when the map has scroll
wheel zoom enabled, and the info box has overflows, moving the scroll wheel
inside the info box causes the map to zoom.
Looks like the infobox just needs to cancel some mouse events after i handles
them... mostly click, move and scroll events.
Original comment by [email protected]
on 2 Jan 2011 at 4:59
from google-maps-utility-library-v3.
I got it to work perfectly using jQuery 1.4 + and the "live" event :
jQuery(document).ready(function(){
// Disable map Dragging when cursor enters infoBox div
jQuery("#theinfoBox").live("mouseenter", function(){
map.setOptions( {draggable:false} );
})
jQuery("#theinfoBox").live("mouseleave" , function(){
map.setOptions( {draggable:true} );
});
});
Original comment by [email protected]
on 2 Jan 2011 at 12:33
from google-maps-utility-library-v3.
The # selector is for id. There is no default id given for the infoBox div. A
default class is assigned = "infoBox". So using the . selector in jQuery would
make more sense, unless you modified the infoBox source code to include an id
called "theinfoBox".
Either way I am having issues with jQuery even finding the div in both cases.
Even when I use the chrome console and run $(".infoBox");, an empty array is
returned. I've also tried using the IE developer tool bar and I've looked at
the div where my infobox is located and the class does = "infoBox".
Where are you putting that jQuery code? Right into the html page for the map?
Original comment by [email protected]
on 20 Jun 2012 at 11:02
from google-maps-utility-library-v3.
Ok, so this works great for a desktop web-browser but when I try to scroll the
infobox on a mobile device (i.e Android) i can't seem to get the event
propagation right. I can get it to not pan the map but then it just scrolls the
page and if I prevent the page from being scrolled when trying to scroll the
infoBox (using e.preventDefault()) nothing scrolls but that includes the
infoBox.
It seems I can't get the scroll event to target the infoBox. Any ideas of how
to work around this?
Original comment by [email protected]
on 30 Aug 2012 at 11:41
from google-maps-utility-library-v3.
even scroll does not work in infowindow.. we tested it on andriod 2.3 but it
works fine in 4.0 version..
Original comment by [email protected]
on 18 Feb 2013 at 7:31
from google-maps-utility-library-v3.
we got stuck in disabling drag on infobox and zoom when we try to scrol on
infobox..
we are using latest v3 infobox..
thanks..
Original comment by [email protected]
on 18 Feb 2013 at 7:38
from google-maps-utility-library-v3.
Related Issues (20)
- White tiles in Chrome
- Add CLASS to IMG in infobubble.js
- MarkerClusterer: ClusterIconStyle - fontFamily and fontWeight not working
- MarkerWithLabel V3, cannot hide marker labels in V 1.1.0 HOT 2
- MarkerWithLabel: labelInBackground property doesn't work HOT 2
- MarkerWithLabel: dom elements inside labelContent HOT 1
- Scrolling on InfoWindow inconsistent between Firefox and Chrome HOT 2
- select tags not working inside richmarkers
- map cluster marker not loaded over https HOT 2
- Rendering issues with accuracy circle
- Ability to change datasets and recluster
- MarkerWithLabel with draggable=false doesn't fire mouseup event when clicking on label
- Markers is not shown properly if it is on same place using marker cluster.
- Retina icons are not rendered correctly by marker clusterer plus
- Broken image m1.png
- Patch for /trunk/infobox/src/infobox.js HOT 1
- Problem in setPosition
- Overlapping Labels
- Transit stations are still not clickable
- setPosition not working* HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-maps-utility-library-v3.