Add Popups
This commit is contained in:
parent
e86fc183d3
commit
8540b2c73c
@ -76,7 +76,7 @@ if (count($community) == 1) {
|
||||
<script>
|
||||
var communityiesGeoJson = []
|
||||
<?php foreach (array_slice($community, 0) as $i => $value):?>
|
||||
communityiesGeoJson.push({"geojson": "<?php echo $value['geojson'] ?>"})
|
||||
communityiesGeoJson.push({"geojson": "<?php echo $value['geojson'] ?>", "name": "<?php echo $value['name'] ?>"})
|
||||
<?php endforeach ?>
|
||||
</script>
|
||||
<script src="js/comunitychoose.js"></script>
|
||||
|
@ -23,6 +23,13 @@ $(document).ready(function() {
|
||||
}
|
||||
}).addTo(map)
|
||||
community.on('click', mapChangeCommunity);
|
||||
community.bindPopup(i.name)
|
||||
community.on('mouseover', function (e) {
|
||||
this.openPopup();
|
||||
});
|
||||
community.on('mouseout', function (e) {
|
||||
this.closePopup();
|
||||
});
|
||||
})
|
||||
})
|
||||
});
|
Loading…
Reference in New Issue
Block a user