$(".dropdown > a").on("touchstart click", function (e) {
e.preventDefault();
if($(this).hasClass('mobile-submenu-active')){
$(this).removeClass("mobile-submenu-active");
$(this).next('.dropdown-menu').slideToggle(300);
}else{
$(this).closest('.menu').find(".dropdown-menu").slideUp(300);
$(this).closest('.menu').find(".dropdown a").removeClass("mobile-submenu-active");
$(this).addClass("mobile-submenu-active");
$(this).closest('.dropdown').find(".dropdown-menu").slideDown(300);
}
var selector = $(".toper_mobile .menu > li.dropdown > a");
selector.on("touchstart click", function (e) {
e.preventDefault();
if(!1 === $(this).next().is(":visible")){
$(this).parent().siblings().find(".dropdown-menu").slideUp(300),
$(selector).removeClass("mobile-submenu-active")
}
$(this).next().slideToggle(300);
$(this).addClass("mobile-submenu-active");
});
for (var i = 0; i < locations.length; i++) {
geocodeAddress(locations[i], i == 0);
}
function geocodeAddress(location, isSetToCenterMap) {
geo.geocode({'address' : location[0]}, function (results,status) {
if(status == google.maps.GeocoderStatus.OK) {
if (isSetToCenterMap) {
map.setCenter(results[0].geometry.location);
}
createMarker(results[0].geometry.location,location[0],location[1],location[2]);
}
}
});
ctx.beginPath();
ctx.arc(75,75,50,0,Math.PI*2,true);
ctx.stroke();
ctx.beginPath();
ctx.arc(75,75,35,0,Math.PI,false); // рот (по часовой стрелке)
ctx.stroke();
function initMap() {
var myLatLng = {lat: -25.363, lng: 131.044};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: myLatLng
});
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Hello World!'
});
}
const info = new google.maps.InfoWindow();
marker.addListener('click', function() {
info.setContent('сюда засовываете свою информацию');
info.open(map, marker);
});