Maps not visible when viewing from mobile device (phone)

David Franken's picture
David Franken
Sat, 08/20/2016 - 16:08
#1
Maps not visible when viewing from mobile device (phone)

Hi,

I noticed that the googles maps map is nog visible when viewing from an mobile device; for example my phone.

I tested with both a iPhone 6 as a Android phone, also with both Safari as Firefox. Every varriation does not show the map ,but only a white space.

website: www.franken.pro

Thanks again!

Regards

David

phuonght's picture
phuonght
Mon, 08/22/2016 - 23:17

Hi,

Please go to file template.preprocess.inc (sites/all/themes/md_chulan/inc/front), line 29, replace

(drupal_add_js('http://maps.google.com/maps/api/js?sensor=false');)

with

drupal_add_js('https://maps.googleapis.com/maps/api/js?key=AIzaSyCiVV6Y6eoCmqPhimYk3jCWG-a0xkenbU8&sensor=false');
David Franken's picture
David Franken
Tue, 08/23/2016 - 08:24

This worked, thanks!

David Franken's picture
David Franken
Tue, 08/23/2016 - 10:05

I was to quick; it doesnt show on my phone. But in my browser it does when i make my screen smaller?

i already cleared the cache, but still no map on my phone.

David Franken's picture
David Franken
Wed, 08/24/2016 - 03:10

I tested different things:

  1. Open the website directly with my inspector and set it to the mobile device (with Chrome; F12 and then CTRL+SHIFT+M)

  2. Open the wesite normal, wait until it fully loaded and then scale it down to mobile device.

When doing 1. ; the map is not shown.

When doing 2. ; the map is correctly shown.

Image title

Normal site loaded

Image title

Normal site loaded first and ten scaled it down to mobile device mode (Chrome; F12 and CTRL+SHIFT+M )

Image title

Normal site loaded, scaled it down and hard reloaded the site with empy cache (in chrome)

Image title

phuonght's picture
phuonght
Wed, 08/24/2016 - 22:49

Please try to follow our comment #2. We checked js by using Ctrl+U in browser and could see js is still the old one.  

David Franken's picture
David Franken
Thu, 08/25/2016 - 05:11

hi Phuonght,

sorry, still i didnt got it working; i also changed the file at sites/www.franken.pro/themese/md_chulan/inc.front but still no luck :(

i also don't see the entry anymore in the source (CTRL + U like you said) between line 82 and 89. 

I do see something about googlemaps in line 91, but not sure if that is normal.

thanks for look at it again.

regards

david

David Franken's picture
David Franken
Mon, 08/29/2016 - 03:29

Hi Phuonght,

I changed it earlier; can you see that it is changed?

thanks!

Regards

David

phuonght's picture
phuonght
Tue, 08/30/2016 - 05:42

Please open file template.preprocess.inc (sites/all/themes/md_chulan/inc/front), remove lines from 336 to 341

var onMobile = false;
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) {
onMobile = true;
}
if (onMobile == false){

and line 382

}
David Franken's picture
David Franken
Tue, 08/30/2016 - 09:54

I'm sorry to say Phuonght, but this also didn't work :(

Regards

David

phuonght's picture
phuonght
Wed, 08/31/2016 - 04:39

Have you tried to clear cache? If it still does not work, please send us your FTP account so we can have a check.

David Franken's picture
David Franken
Wed, 08/31/2016 - 17:28

Yes i did that also.

I will send you the details in a private message

phuonght's picture
phuonght
Wed, 08/31/2016 - 23:42

Can not access FTP. Can you please check again?

phuonght's picture
phuonght
Sun, 09/04/2016 - 22:38

Hi,

Please add our public IP: 117.7.210.54. We still can not connect your FTP.

phuonght's picture
phuonght
Wed, 09/07/2016 - 03:30

Hi,

We fixed. Check site please. 

David Franken's picture
David Franken
Wed, 09/07/2016 - 09:24

Woohoo! thanks! i checked it; what was the problem (just curious :) )

phuonght's picture
phuonght
Thu, 09/08/2016 - 00:39

By default, our js code does not allow map to display in mobile mode. We fixed it with solution at comment #9. 

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.