Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] Maps in a Tab

Maps in a Tab 07 Aug 2016 15:35 #14366

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
This particular issues is an OLD favourite with Google Maps and Tabs and is visible in your demo as well

j-cook.pro/index.php/demo/cities

Click any city, click the map tab

Grey empty box..

This is due to the tab content needing a refresh and normally you would just reload your map using an onClick / onLoad type event and a custom function that just requires the data from google.. but of course we are using a fly form rendering. If you are planning on using TABS as an option in your builder, you need an integrated fix for this as any tab (except the FIRST loaded tab) that has a map in it will always be empty and grey

If anyone already has a work around for hidden tab content + J-Cook map, please share your fix.

Thanks
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Maps in a Tab 07 Aug 2016 16:29 #14370

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Cool !

Thank you for that, for me many times it was not working, and only few times it worked, so I let it lie that knowing there was something wrong, and now I understand better.

Moved in tickets.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: MorganL

Maps in a Tab 07 Aug 2016 16:31 #14371

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
It is normally atrributed to the size or something naff like that

most fixes hinge around refreshing the height

$('.nav-tabs').on('shown.bs.tab', function () {
google.maps.event.trigger(window, 'resize', {});
});

is a standard fix, though not tried it yet as I can work without a tab if need be

stackoverflow.com/questions/24544792/how...bootstrap-jquery-tab
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Maps in a Tab 07 Aug 2016 16:33 #14372

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Gonna have a look.

At the moment, I am redesigning the website.
Didn't you noticed a change ?
Coding is now a piece of cake
The administrator has disabled public write access.

Maps in a Tab 07 Aug 2016 16:36 #14374

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
of course.. very pro
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Maps in a Tab 07 Aug 2016 16:37 #14375

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Not finished. Gonna work all night.

I will fix your tickets (and the others) tomorrow.
Coding is now a piece of cake
The administrator has disabled public write access.

Maps in a Tab 09 Aug 2016 13:20 #14405

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Fixed.
Coding is now a piece of cake
The administrator has disabled public write access.
The following user(s) said Thank You: MorganL, jamaza

Maps in a Tab 29 Aug 2016 12:24 #14499

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
Hi Chef

I see this is now fixed on your demo, how did you fix this. I updated my jdom plugin but maps are still not refreshing on my view when not in a hidden tab,, of course I am not using Bootstrap tabs which your fix my be geared towards

Did you do the fix in JDom or just specifically on your demo.. can you remember how YOU fixed your view
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Maps in a Tab 29 Aug 2016 18:08 #14500

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
I used your fix. It has worked like a charm.

No, it cannot be placed in JDom because the code is triggered from the tab event.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.070 seconds

Get Started