FusionTable-Map-Template icon indicating copy to clipboard operation
FusionTable-Map-Template copied to clipboard

map of marker results is not centered on some mobile devices

Open JackDougherty opened this issue 9 years ago • 4 comments

Derek Not sure if this is an issue (or my user error!) so feel free to close it out if I'm mistaken.

Your template works wonderfully on desktops/laptops, but I'm having problems with viewing map results in some mobile devices.

When using your current template and searching for Chicago zip code 60606 on some mobile devices (such as iPhone 5), the results are not centered, and therefore not immediately visible on the small screen. See screenshot templateresults-iphone5

However, map results are centered when I use the Chrome for desktop developer tools emulator for iPhone 5, as shown below template-chromeemulator

Also, results are centered on larger mobile devices, such as Nexus 7 tablet.

So. . . is this an issue, or not? thanks Jack

JackDougherty avatar Mar 12 '15 12:03 JackDougherty

There is a relation between zoom level and display resolution. Current default zoom is suggested for desktop screens, but mobile screens should default to a lower zoom.

Perhaps instead of setting center and zoom, the constructor should use the fitBounds method.

  • Pros for any resolution the map would pick the best zoom it can offer to fit the bounds.
  • Cons it's much more intuitive to pick center and zoom instead of [SE, NW]

Perhaps the bounds property should override the center and zoom only when it's defined?

ffflabs avatar Mar 12 '15 18:03 ffflabs

Did you ever find a solution to this problem?

machewgc avatar Apr 28 '16 16:04 machewgc

Good afternoon,

  I tried to follow indications als installation file, but I do not jump the counter results nor logically me the sample.    I downloaded the example of chicago website where a button on the shows you cercanos.Pero sites appears no way to put it into production.

Could you help me? I have found that I While fusiontable by location but not I'm doing wrong and this is my salvation!

Thank you very much and excuse my English

gontxillo avatar Oct 05 '16 14:10 gontxillo

In iOS as a user scrolls down from the very top of the page, the URL bar morphs from it's normal state (with address bar) into a compact view. As this happens the viewport size is changing and firing a resize event in maps_lib.js google.maps.event.addDomListener(window, 'resize') which recenters the map. Unfortunately the map's centerpoint does not update when you do a search. One could could potentially modify maps_lib.js to update the centerpoint to correct the behavior. I've opted to remove the event listener entirely because it was an enhancement anyway, not critical behavior.

You'll notice that this will happen in desktop browsers as well should you resize the viewport. It's just a more in your face situation on iOS because you cannot avoid scrolling.

scottcarver avatar Dec 07 '16 22:12 scottcarver