Browse files

Merge patch from @e1himself. Closes #17.

  • Loading branch information...
1 parent dc70973 commit 04d13fdd89d84b649ac7aab3189c3449fd6c7347 @galen committed Mar 5, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 Map.php
View
7 Map.php
@@ -1257,7 +1257,7 @@ public function setHeight( $height ) {
* @return void
*/
public function setUnitsMetric() {
- $this->setUnits( 'metric' );
+ $this->setUnits( 'METRIC' );
}
/**
@@ -1266,7 +1266,7 @@ public function setUnitsMetric() {
* @return void
*/
public function setUnitsImperial() {
- $this->setUnits( 'imperial' );
+ $this->setUnits( 'IMPERIAL' );
}
/**
@@ -1969,7 +1969,7 @@ function getMapJS() {
$request_options .= sprintf( "\t\ttravelMode: google.maps.DirectionsTravelMode.%s,\n", strtoupper( $this->directions->request_options['travelMode'] ) );
break;
case 'units':
- $request_options .= sprintf( "\t\tunitSystem: google.maps.DirectionsUnitSystem.%s,\n", isset( $this->directions->request_options['units'] ) ?: $this->units );
+ $request_options .= sprintf( "\t\tunitSystem: google.maps.DirectionsUnitSystem.%s,\n", isset( $this->directions->request_options['units'] ) ? $this->directions->request_options['units'] : $this->units );
break;
default:
$request_options .= sprintf( "\t\t%s:%s,\n", $request_option, $this->phpToJs( $request_value ) );
@@ -2462,4 +2462,5 @@ function enablePlacesAutocomplete( array $options = array() ) {
$this->autocomplete_options = $options;
}
}
+
}

0 comments on commit 04d13fd

Please sign in to comment.