Fix zoom issue in dashboard map. #424
This commit is contained in:
parent
8f6aa72cc0
commit
46bcf7f209
2 changed files with 10 additions and 3 deletions
|
|
@ -147,7 +147,7 @@ class DashboardMap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
putMarkerWithLabel(id, lat, lng, markers, icon, layer_group, popup_url) {
|
putMarkerWithLabel(id, lat, lng, markers, icon, layer_group, popup_url, name) {
|
||||||
var my = this;
|
var my = this;
|
||||||
// existing marker
|
// existing marker
|
||||||
if (markers.hasOwnProperty(id)) {
|
if (markers.hasOwnProperty(id)) {
|
||||||
|
|
@ -238,7 +238,8 @@ class DashboardMap {
|
||||||
this.rider_markers,
|
this.rider_markers,
|
||||||
this.options.icons.rider_available,
|
this.options.icons.rider_available,
|
||||||
this.layer_groups.rider_available,
|
this.layer_groups.rider_available,
|
||||||
this.options.rider_popup_url
|
this.options.rider_popup_url,
|
||||||
|
name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -250,7 +251,8 @@ class DashboardMap {
|
||||||
this.rider_markers,
|
this.rider_markers,
|
||||||
this.options.icons.rider_active_jo,
|
this.options.icons.rider_active_jo,
|
||||||
this.layer_groups.rider_active_jo,
|
this.layer_groups.rider_active_jo,
|
||||||
this.options.rider_popup_url
|
this.options.rider_popup_url,
|
||||||
|
name
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -300,6 +302,7 @@ class DashboardMap {
|
||||||
$.each(riders, function(id, data) {
|
$.each(riders, function(id, data) {
|
||||||
var lat = data.latitude;
|
var lat = data.latitude;
|
||||||
var lng = data.longitude;
|
var lng = data.longitude;
|
||||||
|
var name = data.name;
|
||||||
|
|
||||||
if (data.has_jo)
|
if (data.has_jo)
|
||||||
my.putRiderActiveJOMarker(id, lat, lng, name);
|
my.putRiderActiveJOMarker(id, lat, lng, name);
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,10 @@ class HomeController extends Controller
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get full name of rider
|
||||||
|
$name = $rider->getFullName();
|
||||||
|
$riders[$rider_id]['name'] = $name;
|
||||||
|
|
||||||
$jo = $rider->getActiveJobOrder();
|
$jo = $rider->getActiveJobOrder();
|
||||||
if ($jo == null)
|
if ($jo == null)
|
||||||
$riders[$rider_id]['has_jo'] = false;
|
$riders[$rider_id]['has_jo'] = false;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue