diff --git a/README.md b/README.md index b7f233a..df00f97 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/releases.json b/releases.json index e3bfe7e..d72c2cf 100644 --- a/releases.json +++ b/releases.json @@ -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`" + ] } ] diff --git a/simplemap/SimpleMapPlugin.php b/simplemap/SimpleMapPlugin.php index b3cea27..344bb5f 100644 --- a/simplemap/SimpleMapPlugin.php +++ b/simplemap/SimpleMapPlugin.php @@ -24,7 +24,7 @@ public function getDescription() public function getVersion() { - return '1.8.1'; + return '1.8.2'; } public function getSchemaVersion() diff --git a/simplemap/services/SimpleMapService.php b/simplemap/services/SimpleMapService.php index 141c43b..41cd93c 100644 --- a/simplemap/services/SimpleMapService.php +++ b/simplemap/services/SimpleMapService.php @@ -9,7 +9,6 @@ class SimpleMapService extends BaseApplicationComponent { public $settings; public $searchLatLng; - public $searchEarthRad; public $searchDistanceUnit; private static $_parts = [ @@ -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'];