infoWindows stop displaying after page is scrolled in Mobile Safari.

131 views
Skip to first unread message

Brandon

unread,
Apr 22, 2011, 1:38:35 AM4/22/11
to Google Maps JavaScript API v3
Hi,

I created a page that pulls property data and plots markers on a map:

http://mimcoinc.com/map/new_mexico

When you click on a marker, an infoWindow appears. Everything works
great in all browsers (desktop and mobile). However, I noticed that
the click events get screwed up if the user scrolls the webpage in
Mobile Safari on an iPhone and iPad. For example, I loaded the page
in Mobile Safari on my iPad, and I can click on a marker to view the
infoWindow. As soon as I scroll down on the page (the actual page and
not the map), my click events no longer work properly. If I scroll
down 50 pixels, then I need to click 50 pixels above the marker that I
want to see the infoWindow of that marker.

Is there any way to fix this? Do I need to redraw my markers if the
page is scrolled? Any help is greatly appreciated.

Thanks,
Brandon

Alix Bergeret

unread,
Apr 24, 2011, 2:52:09 PM4/24/11
to google-map...@googlegroups.com
Ah, I am having the exact same problem.

But I see that the same error occurs on Google's own example, here:
http://code.google.com/apis/maps/documentation/javascript/

To replicate the issue:
- make sure your browser window is scrolled all the way to the top.
- double click on "Bowling green" on the map (for example !).
- the map should zoom on to Bowling Green.

- now refresh the page to reset everything.
- scroll your browser window (NOT the map itself!) down quite a bit, but so you can still see "Bowling Green".
- Double click on it again.
- This time you are taken further south ! The difference in pixels depends on how much you have scroll down.

This basically means that scrolling down the page on Safari iOS messes up the coordinates themselves! This affects everything, including marker detection, hence the problem described above.

What is causing this? And how do we fix it?

Cheers!

Alix Bergeret

unread,
Apr 24, 2011, 2:54:27 PM4/24/11
to google-map...@googlegroups.com
(I forgot to say - do the above on the iPad for example)

Alix Bergeret

unread,
May 4, 2011, 10:33:57 AM5/4/11
to google-map...@googlegroups.com
Hi again,

No reaction?

Are we saying we cannot use the Google Maps on iOS, unless it is in full screen mode? This seems a bit strange...

Please let us know if we are missing something :)

Alix

Brandon

unread,
May 6, 2011, 2:55:04 AM5/6/11
to Google Maps JavaScript API v3
Hi Alix,

I have looked everywhere and I can't find any information on how to
fix the issue. It also seems strange to me that the Google Maps API
can't be used on iOS unless it is in full screen mode, and I doubt
that we are the only two people having an issue.

Can anyone help?

Brandon

VimS

unread,
May 11, 2011, 11:25:24 AM5/11/11
to Google Maps JavaScript API v3
Hi Guys,

I'm sorry I can't help you.
But I'm having the same issue!
So we are at least 3! :-)

Sebastian

Brandon

unread,
May 17, 2011, 11:53:23 AM5/17/11
to Google Maps JavaScript API v3
I noticed that the Groupon site has an embedded Google map that
functions properly in Mobile Safari. You can still click on the
marker even after you've scrolled up and down on the page, and the
marker reacts normally. Here is the link to the page I saw this on:

http://www.groupon.com/deals/panorama-kids-studio?c=all&p=0

Can anyone help? Is the only option to get an embedded Google Map
working properly on Mobile Safari is to use full screen mode?

Micha

unread,
Jun 27, 2011, 8:40:12 AM6/27/11
to Google Maps JavaScript API v3
I've got the same problem. Did you find any solution for it?

The Groupon Site is made with HTML5, maybe this is the cause why it
works?

On May 17, 5:53 pm, Brandon <impulsedevelopm...@gmail.com> wrote:
> I noticed that the Groupon site has an embedded Google map that
> functions properly in Mobile Safari.  You can still click on themarkereven after you've scrolled up and down on the page, and themarkerreacts normally.  Here is the link to the page I saw this on:

Jake VanDerhoef

unread,
Jun 30, 2011, 8:18:37 AM6/30/11
to Google Maps JavaScript API v3
I was having the same problem, the only solution I have found for this
is to iframe the map.
Reply all
Reply to author
Forward
0 new messages