Maps are not displayed correctly

  • chidalgom
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
7 months 6 days ago #11419 by chidalgom
Replied by chidalgom on topic Maps are not displayed correctly
Finally i came with a little bit dirty solution, and I got what I need to get.
Have to modified the file display_map_data.php and added this code at very bottom of the page:

//custom script
echo '<script type="text/javascript">
jQuery(document).ready(function($) {
$("a[data-toggle=\'tab\']").on(\'shown.bs.tab\', function(e) {
var map = map'.$mapDivSuffix.', infowindow'.$mapDivSuffix.';
var center = latlng'.$mapDivSuffix.', routeaddress'.$mapDivSuffix.';
google.maps.event.trigger(map, "resize");
map.setCenter(center);
});
});
</script>';

Basically this add a default bootstrap tab event that fires the resize map function when any tab target get active, specially for maps located in other tabs.
Its not the cleanest thing but it works for me... if someone have a cleaner solution, please share.

thanks

Please Log in or Create an account to join the conversation.

More
6 months 1 week ago #11431 by Dima
Replied by Dima on topic Maps are not displayed correctly
OK. Thanks for sharing.
Probably someone will use it.

Don't forget support my developments: post review in JED, donate ;)

Post your sites as examples into my directory
Google: forum.zhuk.cc/index.php/forum/gm-user-s-sites
Yandex: forum.zhuk.cc/index.php/forum/ym-user-s-sites
Baidu: forum.zhuk.cc/index.php/forum/bdm-user-s-sites

Please Log in or Create an account to join the conversation.

Time to create page: 0.061 seconds

Donate


Go to top