Skip to content

Commit

Permalink
Merge pull request galen#1 from e1himself/patch-1
Browse files Browse the repository at this point in the history
Fixed directions unitSystem option rendering
  • Loading branch information
ansata2001 committed Feb 13, 2013
2 parents 24eefe0 + 1902f36 commit 3e35ce9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ public function setHeight( $height ) {
* @return void
*/
public function setUnitsMetric() {
$this->setUnits( 'metric' );
$this->setUnits( 'METRIC' );
}

/**
Expand All @@ -1237,7 +1237,7 @@ public function setUnitsMetric() {
* @return void
*/
public function setUnitsImperial() {
$this->setUnits( 'imperial' );
$this->setUnits( 'IMPERIAL' );
}

/**
Expand Down Expand Up @@ -1940,7 +1940,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 ) );
Expand Down Expand Up @@ -2392,4 +2392,4 @@ function enableClustering( $clustering_js_file, $options = null ) {
$this->clustering_options = $options;
}

}
}

0 comments on commit 3e35ce9

Please sign in to comment.