i have difficulty in toggling marker in google maps specifically i'm using gmaps.js to open and close div. On "click" function how would i toggle up div open and close. Below is an example interaction that suits me: https://www.google.com/maps/d/viewer?mid=zbteFZbu8JKc.kxnGVlIRxhQI&hl=en
arraylist = {
name: "Gunung Kinabalu",
height: 4095,
latitude: 6.07484,
longitude: 116.562853,
location: "Sabah",
picture: "Gunung Kinabalu.jpg"
},
map = new GMaps({
el: '#map',
lat: 4.2062722,
lng: 107.9405116,
zoomControl : true,
zoomControlOpt: {
style : 'SMALL',
position: 'TOP_LEFT'
},
minZoom: 6,
maxZoom: 10,
panControl : false,
streetViewControl : false,
mapTypeControl: false,
overviewMapControl: false,
});
for(var i = 0; i < arrayList.length; i++) {
map.addMarker({
id : arrayList[i].name,
lat: arrayList[i].lat,
lng: arrayList[i].lng,
title: arrayList[i].name,
infoWindow: {
content: arrayList[i].name
},
details: {
name:arrayList[i].name,
pic:arrayList[i].pic,
height:arrayList[i].height,
loc:arrayList[i].loc,
},
mouseover: function(e){
this.infoWindow.open(this.map, this);
},
mouseout: function(e){
this.infoWindow.close(this.map, this);
},
click: function(e){
//here the events to toggle div
}
});
}