Skip to content

Commit 79a068d

Browse files
committed
Change mapType() to type() to match column
1 parent 7f0483b commit 79a068d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ use Cheesegrits\FilamentGoogleMaps\Fields\Map
358358
->defaultLocation([39.526610, -107.727261]) // default for new forms
359359
->draggable() // allow dragging to move marker
360360
->clickable(false) // allow clicking to move marker
361-
->mapType('roadmap') // map type (hybrid, satellite, roadmap, terrain)
361+
->type('roadmap') // map type (hybrid, satellite, roadmap, terrain)
362362
->geolocate() // adds a button to request device location and set map marker accordingly
363363
->geolocateLabel('Get Location') // overrides the default label for geolocate button
364364
->geolocateOnLoad(true, false) // geolocate on load, second arg 'always' (default false, only for new form))

src/Fields/Map.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Map extends Field
7171

7272
protected ?Closure $placeUpdatedUsing = null;
7373

74-
protected Closure|string $mapType = 'roadmap';
74+
protected Closure|string $type = 'roadmap';
7575

7676
protected Closure|array $drawingModes = [
7777
'marker' => true,
@@ -822,9 +822,9 @@ public function getMapConfig(): string
822822
'debug' => $this->getDebug(),
823823
'gmaps' => MapsHelper::mapsUrl(false, $this->getDrawingControl() ? ['drawing'] : []),
824824
'polyOptions' => $this->getPolyOptions(),
825-
'rectangleOptions' => $this->getRectangeOptions(),
825+
'rectangleOptions' => $this->getRectangleOptions(),
826826
'circleOptions' => $this->getCircleOptions(),
827-
'mapType' => $this->getMapType(),
827+
'mapType' => $this->getType(),
828828
]);
829829

830830
//ray($config);
@@ -887,15 +887,15 @@ public function getCircleOptions(): ?array
887887
return $this->evaluate($this->circleOptions);
888888
}
889889

890-
public function mapType(Closure|string $mapType): static
890+
public function type(Closure|string $type): static
891891
{
892-
$this->mapType = $mapType;
892+
$this->type = $type;
893893

894894
return $this;
895895
}
896896

897-
public function getMapType(): string
897+
public function getType(): string
898898
{
899-
return $this->evaluate($this->mapType);
899+
return $this->evaluate($this->type);
900900
}
901901
}

0 commit comments

Comments
 (0)