Skip to content

Commit cd3019c

Browse files
committed
- (Bug Fix) Set a defined scaledSize for icons generated with the plot method
1 parent 46e40a8 commit cd3019c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

models/GoogleMaps_DirectionsModel.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ public function plot($map)
2424
'content' => $leg->start_address,
2525
'lat' => $leg->start_location->lat,
2626
'lng' => $leg->start_location->lng,
27-
'icon' => $icon
27+
'icon' => array(
28+
'url' => $icon,
29+
'scaledSize' => array(22, 40)
30+
)
2831
);
2932

3033
if($index == count($route->legs) - 1)
@@ -35,7 +38,10 @@ public function plot($map)
3538
'content' => $leg->end_address,
3639
'lat' => $leg->end_location->lat,
3740
'lng' => $leg->end_location->lng,
38-
'icon' => $icon
41+
'icon' => array(
42+
'url' => $icon,
43+
'scaledSize' => array(22, 40)
44+
)
3945
);
4046

4147
$locations[] = array(

0 commit comments

Comments
 (0)