View Full Version : Google Maps Overlay with setActiveItem(...)?

26 Apr 2011, 3:35 PM

so I did create a custom Tooltip for Google Maps Markers and wanted to set a link on this tooltip so that it changes my activeItem in my Panel (like Google Map on mobile phone works).

The only thing i came up with is this solution:

function openSpot(num) {

ToolTip.prototype.draw = function() {
//inner is the DIV which is created on the Plane
inner.innerHTML = "<a href='#' onclick=\"openSpot(1)\">Test</a>";
}This works well in Chrome, Safari Desktop Browser and on my Android Phone.
But it doesn't work on the iPhone.

Is there another way?

I also tried

inner.style.onclick = "openSpot(1)"and

inner.on('click', function() {
}But that didn't work.

Does someone know how to do this? Or why it doesn't work on the iPhone?

Thanks in advance

EDIT: Okay sorry, this has nothing to do with sencha but with the event firing of iphone...


If someone got this problem:
a) use <a href='#' onclick='..' rel='external'>...
div.onclick = function() { ... }

Though nothing of this worked for me. Now i added a general click-event on the google-map element and check the clicked position...

If someone knows a solution for this, please help me out :)