Skip to content

Commit 04d13fd

Browse files
committed
Merge patch from @e1himself. Closes galen#17.
1 parent dc70973 commit 04d13fd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Map.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ public function setHeight( $height ) {
12571257
* @return void
12581258
*/
12591259
public function setUnitsMetric() {
1260-
$this->setUnits( 'metric' );
1260+
$this->setUnits( 'METRIC' );
12611261
}
12621262

12631263
/**
@@ -1266,7 +1266,7 @@ public function setUnitsMetric() {
12661266
* @return void
12671267
*/
12681268
public function setUnitsImperial() {
1269-
$this->setUnits( 'imperial' );
1269+
$this->setUnits( 'IMPERIAL' );
12701270
}
12711271

12721272
/**
@@ -1969,7 +1969,7 @@ function getMapJS() {
19691969
$request_options .= sprintf( "\t\ttravelMode: google.maps.DirectionsTravelMode.%s,\n", strtoupper( $this->directions->request_options['travelMode'] ) );
19701970
break;
19711971
case 'units':
1972-
$request_options .= sprintf( "\t\tunitSystem: google.maps.DirectionsUnitSystem.%s,\n", isset( $this->directions->request_options['units'] ) ?: $this->units );
1972+
$request_options .= sprintf( "\t\tunitSystem: google.maps.DirectionsUnitSystem.%s,\n", isset( $this->directions->request_options['units'] ) ? $this->directions->request_options['units'] : $this->units );
19731973
break;
19741974
default:
19751975
$request_options .= sprintf( "\t\t%s:%s,\n", $request_option, $this->phpToJs( $request_value ) );
@@ -2462,4 +2462,5 @@ function enablePlacesAutocomplete( array $options = array() ) {
24622462
$this->autocomplete_options = $options;
24632463
}
24642464
}
2465+
24652466
}

0 commit comments

Comments
 (0)