diff --git a/README.md b/README.md index 98bb0d9..d1e85af 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,17 @@ You can search for elements using the location specified in your map field. When - `radius`: The radius around the location to search. Defaults to `50`. - `unit`: The unit of measurement for the search. Can be either `km` (kilometers) or `mi` (miles). Defaults to `km`. +**API Keys** + +You can access your browser API key in templates using `craft.simpleMap.apiKey`. + ![How it looks](resources/preview.png) ## Changelog +### 1.2.3 +- Browser API key can now be accessed in templates + ### 1.2.2 - Added Browser API key setting diff --git a/SimpleMapPlugin.php b/SimpleMapPlugin.php index c9210f8..f46459f 100644 --- a/SimpleMapPlugin.php +++ b/SimpleMapPlugin.php @@ -24,7 +24,7 @@ public function getDescription() public function getVersion() { - return '1.2.2'; + return '1.2.3'; } public function getSchemaVersion() diff --git a/releases.json b/releases.json index ad42ad9..b57322a 100644 --- a/releases.json +++ b/releases.json @@ -76,5 +76,13 @@ "notes": [ "- Added Browser API key setting" ] + }, + { + "version": "1.2.3", + "downloadUrl": "https://github.com/ethercreative/SimpleMap/archive/v1.2.3.zip", + "date": "2016-07-07T10:00:00-08:00", + "notes": [ + "- Browser API key can now be accessed in templates" + ] } ] \ No newline at end of file diff --git a/variables/SimpleMapVariable.php b/variables/SimpleMapVariable.php index a0d1a6f..1e3e097 100644 --- a/variables/SimpleMapVariable.php +++ b/variables/SimpleMapVariable.php @@ -12,4 +12,8 @@ public function latLng ($lat, $lng) return compact('lat', 'lng'); } + public function apiKey () { + return craft()->plugins->getPlugin('simpleMap')->getSettings()->browserApiKey; + } + } \ No newline at end of file