Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 1 addition & 27 deletions js/partnerMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,8 @@ var myBlueIcon = L.icon({
shadowAnchor: [20, 36]
});

var markerHinxton = L.marker([56.490669, -4.202646], {icon: myBlueIcon}).addTo(mymap);
markerHinxton.bindPopup("<b>Welcome Sanger Institute</b><br>Cambridge, UK<br>Stephen Bentley").openPopup();

let isClicked = false

markerHinxton.on({
mouseover: function() {
if(!isClicked) {
this.openPopup()
}
},
click: function() {
isClicked = true
this.openPopup()
}
})

mymap.on ({
click: function() {
isClicked = false
},
popupclose: function () {
isClicked = false
}
})

var markerHinxton = L.marker([52.0785, 0.1861], {icon: myBlueIcon}).addTo(mymap);
markerHinxton.bindPopup("<b>Welcome Sanger Institute</b><br>Cambridge, UK<br>Stephen Bentley").openPopup();
markerHinxton.bindPopup("<b>Welcome Trust Sanger Institute</b><br>Cambridge, UK<br>Stephen Bentley").openPopup();

let isClicked = false

Expand Down