jQuery(document).ready(function ($) {
var center, map;
function init() {
var mapStyles = [
{
"featureType": "all",
"elementType": "all",
"stylers": [
{
"visibility": "on"
}
]
}
];
center = new google.maps.LatLng(39.070379, -96.281433);
var mapOptions = {
zoom: 18,
center: center,
styles: mapStyles,
scrollwheel: true,
zoomControl: true,
mapTypeControl: true,
scaleControl: true,
streetViewControl: true,
rotateControl: true,
fullscreenControl: true };
var mapElement = document.getElementById('stm_map-32736');
map = new google.maps.Map(mapElement, mapOptions);
var marker = new google.maps.Marker({
position: center,
icon: 'https://autoexport.ge/wp-content/themes/motors-child/assets/images/map-marker.png',
map: map
});
var infowindow = new google.maps.InfoWindow({
content: '
1208 Road 345, Allen, KS 66833, United States
',
pixelOffset: new google.maps.Size(0,71),
boxStyle: {
width: "320px"
}
});
marker.addListener('click', function() {
infowindow.open(map, marker);
map.setCenter(center);
});
}
$('.vc_tta-tab').on('click', function(){
if(typeof map != 'undefined' && typeof center != 'undefined') {
setTimeout(function () {
google.maps.event.trigger(map, "resize");
map.setCenter(center);
}, 1000);
}
})
$('a').on('click', function(){
if(typeof $(this).data('vc-accordion') !== 'undefined' && typeof map != 'undefined' && typeof center != 'undefined') {
setTimeout(function () {
google.maps.event.trigger(map, "resize");
map.setCenter(center);
}, 1000);
}
})
$('.wpb_tour_tabs_wrapper.ui-tabs ul.wpb_tabs_nav > li').on('click', function(){
if(typeof map != 'undefined' && typeof center != 'undefined') {
setTimeout(function () {
google.maps.event.trigger(map, "resize");
map.setCenter(center);
}, 1000);
}
})
$(window).on('resize', function(){
if(typeof map != 'undefined' && typeof center != 'undefined') {
setTimeout(function () {
map.setCenter(center);
}, 1000);
}
});
// initialize map
document.body.addEventListener('stm_gmap_api_loaded', init, false);
});
/* white background and box outline */
.gm-style > div:first-child > div + div > div:last-child > div > div:first-child > div {
border: none !important;
box-shadow: rgba(0, 0, 0, 0.1) 5px 5px 5px !important;
}
/* arrow first */
.gm-style > div:first-child > div + div > div:last-child > div > div:first-child > div > div:first-child > div {
left: 3px !important;
transform: skewX(36deg) !important;
box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 1px !important;
z-index: 40;
}
/* arrow second */
.gm-style > div:first-child > div + div > div:last-child > div > div:first-child > div > div:nth-child(2) > div {
left: 2px !important;
transform: skewX(-36deg) !important;
box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 1px !important;
z-index: 40;
}
.gm-style > div:first-child > div + div > div:last-child > div > div:first-child > div:first-child {
display: none !important;
}
.gm-style > div:first-child > div + div > div:last-child > div > div:first-child > div:nth-child(2){
background-color: transparent !important;
box-shadow: none !important;
}
.gm-style .gm-style-iw {
padding: 10px 10px 5px 10px;
min-height: 54px;
width: 240px !important;
}
.gm-style .gm-style-iw > div > div {
overflow: hidden !important;
}
.gm-style .gm-style-iw h6 {
margin-bottom: 0 !important;
font-weight: 400 !important;
}