Skip to content

Commit

Permalink
Fixed #69 (hehe)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam committed Jan 9, 2018
1 parent a052692 commit a03001b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ Lat/Lng, to display it on a map.

## Changelog

### 1.8.2
- Fixed bug where distance was always `null`

### 1.8.1
- Fixed bug where maps didn't save

Expand Down
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,13 @@
"notes": [
"[Fixed] Fixed bug where maps didn't save"
]
},
{
"version": "1.8.2",
"downloadUrl": "https://github.com/ethercreative/simplemap/archive/v1.8.2.zip",
"date": "2018-01-09T10:33:00-08:00",
"notes": [
"[Fixed] Fixed bug where distance was always `null`"
]
}
]
2 changes: 1 addition & 1 deletion simplemap/SimpleMapPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function getDescription()

public function getVersion()
{
return '1.8.1';
return '1.8.2';
}

public function getSchemaVersion()
Expand Down
3 changes: 1 addition & 2 deletions simplemap/services/SimpleMapService.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class SimpleMapService extends BaseApplicationComponent {
public $settings;

public $searchLatLng;
public $searchEarthRad;
public $searchDistanceUnit;

private static $_parts = [
Expand Down Expand Up @@ -403,7 +402,7 @@ private function _getPartsFromLatLng ($lat, $lng, $address, $locale)

private function _calculateDistance (SimpleMap_MapModel $model)
{
if (!$this->searchLatLng || !$this->searchEarthRad) return null;
if (!$this->searchLatLng || !$this->searchDistanceUnit) return null;

$lt1 = $this->searchLatLng['lat'];
$ln1 = $this->searchLatLng['lng'];
Expand Down

0 comments on commit a03001b

Please sign in to comment.