Merge pull request #27 from ZeusWPI/hoverpopup
moved the popup it doesnt overlap with marker
This commit is contained in:
commit
82b84404f0
1 changed files with 4 additions and 1 deletions
|
@ -21,7 +21,10 @@ $(document).ready(function() {
|
||||||
|
|
||||||
function onEachFeature(feature, layer) {
|
function onEachFeature(feature, layer) {
|
||||||
if (feature.properties) {
|
if (feature.properties) {
|
||||||
layer.bindPopup(popuptemplate(feature.properties));
|
var popup = L.popup({
|
||||||
|
offset: new L.point(0, -6) //Offset needed, marker and popup can't overlap
|
||||||
|
}).setContent(popuptemplate(feature.properties));
|
||||||
|
layer.bindPopup(popup);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue