Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Mar 27, 2023
2 parents dccf65e + aa35670 commit 16ca109
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/Fields/Map.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ class Map extends Field
* Main field config variables
*/
private array $mapConfig = [
'autocomplete' => false,
'autocompleteReverse' => false,
'geolocate' => false,
'geolocateLabel' => '',
'draggable' => true,
'clickable' => false,
'defaultLocation' => [
'autocomplete' => false,
'autocompleteReverse' => false,
'geolocate' => false,
'geolocateLabel' => '',
'draggable' => true,
'clickable' => false,
'defaultLocation' => [
'lat' => 15.3419776,
'lng' => 44.2171392,
],
'controls' => [],
'drawingControl' => false,
'drawingModes' => [
'controls' => [],
'drawingControl' => false,
'drawingModes' => [
'marker' => true,
'circle' => true,
'rectangle' => true,
Expand Down Expand Up @@ -558,7 +558,7 @@ public function mapsHasJs(): bool

public function mapsJsUrl(): string
{
$manifest = json_decode(file_get_contents(__DIR__ . '/../../dist/mix-manifest.json'), true);
$manifest = json_decode(file_get_contents(__DIR__.'/../../dist/mix-manifest.json'), true);

return url($manifest['/cheesegrits/filament-google-maps/filament-google-maps.js']);
}
Expand All @@ -570,7 +570,7 @@ public function mapsHasCss(): bool

public function mapsCssUrl(): string
{
$manifest = json_decode(file_get_contents(__DIR__ . '/../../dist/mix-manifest.json'), true);
$manifest = json_decode(file_get_contents(__DIR__.'/../../dist/mix-manifest.json'), true);

return url($manifest['/cheesegrits/filament-google-maps/filament-google-maps.css']);
}
Expand Down
12 changes: 11 additions & 1 deletion src/Helpers/MapsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,27 @@
class MapsHelper
{
const POSITION_BOTTOM_CENTER = 11;

const POSITION_BOTTOM_LEFT = 10;

const POSITION_BOTTOM_RIGHT = 12;

const POSITION_LEFT_CENTER = 4;

const POSITION_LEFT_TOP = 5;

const POSITION_RIGHT_BOTTOM = 9;

const POSITION_RIGHT_CENTER = 8;

const POSITION_RIGHT_TOP = 7;

const POSITION_TOP_CENTER = 2;

const POSITION_TOP_LEFT = 1;

const POSITION_TOP_RIGHT = 3;

public static function mapsKey($server = false): string
{
return $server ? config('filament-google-maps.keys.server_key') : config('filament-google-maps.keys.web_key');
Expand Down

0 comments on commit 16ca109

Please sign in to comment.