Skip to content

Commit

Permalink
Merge branch 'v3-dev' into v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Tam committed Jan 24, 2018
2 parents 91eadc8 + bf2e67c commit 4c3b099
Show file tree
Hide file tree
Showing 10 changed files with 366 additions and 332 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Network Trash Folder
Temporary Items
.apdisk

vendor/
vendor
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 3.2.0 - WIP
### Fixed
- Not #70 yet

### Improved
- Updated CraftQL support (via @markhuot)
- Updated Mapbox example to use latest API
- Improved address and lat/lng input sizing on smaller screens and in a HUD

## 3.1.3 - 2017-12-18
### Fixed
- Map fields no longer cause global sets to fail to save!
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ Using [Google Maps](https://developers.google.com/maps/documentation/javascript/
And [Mapbox](https://www.mapbox.com/mapbox-gl-js/api/):

```twig
<script src="https://api.mapbox.com/mapbox-gl-js/v0.21.0/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v0.21.0/mapbox-gl.css" rel="stylesheet" />
<script src="https://api.mapbox.com/mapbox-gl-js/v0.43.0/mapbox-gl.js"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v0.43.0/mapbox-gl.css" rel="stylesheet" />
<div id="map" style="width: 400px; height: 300px;"></div>
<script>
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "ether/simplemap",
"description": "A beautifully simple Google Map field type.",
"version": "3.1.3",
"version": "3.2.0",
"type": "craft-plugin",
"license": "MIT",
"minimum-stability": "dev",
"require": {
"craftcms/cms": "^3.0.0-beta.20",
"webonyx/graphql-php": "^0.10.0"
"craftcms/cms": "^3.0.0-beta.20"
},
"autoload": {
"psr-4": {
Expand Down
12 changes: 12 additions & 0 deletions src/SimpleMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use craft\services\Plugins;
use craft\web\twig\variables\CraftVariable;
use ether\simplemap\fields\MapField;
use ether\simplemap\listeners\GetCraftQLSchema;
use ether\simplemap\models\Settings;
use ether\simplemap\services\MapService;
use yii\base\Event;
Expand Down Expand Up @@ -76,6 +77,17 @@ public function init ()
CraftVariable::EVENT_INIT,
[$this, 'onRegisterVariable']
);

// CraftQL Support
/** @noinspection PhpUndefinedNamespaceInspection */
/** @noinspection PhpUnnecessaryFullyQualifiedNameInspection */
if (class_exists(\markhuot\CraftQL\CraftQL::class)) {
Event::on(
MapField::class,
'craftQlGetFieldSchema',
[new GetCraftQLSchema, 'handle']
);
}
}

// Craft: Settings
Expand Down
Loading

0 comments on commit 4c3b099

Please sign in to comment.