Skip to content

Commit

Permalink
May need L.Control.Locate now
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant committed May 22, 2024
1 parent 73dd6ae commit fed75e1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions resources/views/widgets/worldmap.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,17 @@ function populate_markers() {
loadjs('js/leaflet.js', function () {
loadjs('js/leaflet.markercluster.js', function () {
loadjs('js/leaflet.awesome-markers.min.js', function () {
var map = init_map(map_id, map_config);
init_marker_cluster(map);
populate_markers();
loadjs('js/L.Control.Locate.min.js', function () {
var map = init_map(map_id, map_config);
init_marker_cluster(map);
populate_markers();
map.scrollWheelZoom.disable();
$("#leaflet-map-{{ $id }}").on("click", function (event) {
map.scrollWheelZoom.enable();
}).on("mouseleave", function (event) {
map.scrollWheelZoom.disable();
$("#leaflet-map-{{ $id }}").on("click", function (event) {
map.scrollWheelZoom.enable();
}).on("mouseleave", function (event) {
map.scrollWheelZoom.disable();
});
});
});
});
Expand Down

0 comments on commit fed75e1

Please sign in to comment.