@@ -30,10 +30,10 @@ class Geocomplete extends Field implements CanBeLengthConstrained
3030 protected Closure |bool $ isLocation = false ;
3131
3232 protected Closure |bool $ geocodeOnLoad = false ;
33-
33+
3434 protected Closure |bool $ geolocate = false ;
35-
36- protected Closure |string $ geolocateIcon = 'heroicon-s-map ' ;
35+
36+ protected Closure |string $ geolocateIcon = 'heroicon-s-map ' ;
3737
3838 protected Closure |array $ reverseGeocode = [];
3939
@@ -163,40 +163,40 @@ public function getGeocodeOnLoad(): bool|null
163163 return $ this ->evaluate ($ this ->geocodeOnLoad );
164164 }
165165
166- /**
167- * Adds a configurable suffix button to the field which requests the user's location, and if granted will reverse
168- * geocode the resulting coordinates and fill the field with the formatted_address.
169- *
170- * @return $this
171- */
172- public function geolocate (Closure |bool $ geolocate = true ): static
173- {
174- $ this ->geolocate = $ geolocate ;
175-
176- return $ this ;
177- }
178-
179- public function getGeolocate (): bool |null
180- {
181- return $ this ->evaluate ($ this ->geolocate );
182- }
183-
184- /**
185- * Override the icon to use for the geolocate feature, defaults to heroicon-s-map
186- *
187- * @return $this
188- */
189- public function geolocateIcon (Closure |string $ geolocateIcon ): static
190- {
191- $ this ->geolocateIcon = $ geolocateIcon ;
192-
193- return $ this ;
194- }
195-
196- public function getGeolocateIcon (): string
197- {
198- return $ this ->evaluate ($ this ->geolocateIcon );
199- }
166+ /**
167+ * Adds a configurable suffix button to the field which requests the user's location, and if granted will reverse
168+ * geocode the resulting coordinates and fill the field with the formatted_address.
169+ *
170+ * @return $this
171+ */
172+ public function geolocate (Closure |bool $ geolocate = true ): static
173+ {
174+ $ this ->geolocate = $ geolocate ;
175+
176+ return $ this ;
177+ }
178+
179+ public function getGeolocate (): bool |null
180+ {
181+ return $ this ->evaluate ($ this ->geolocate );
182+ }
183+
184+ /**
185+ * Override the icon to use for the geolocate feature, defaults to heroicon-s-map
186+ *
187+ * @return $this
188+ */
189+ public function geolocateIcon (Closure |string $ geolocateIcon ): static
190+ {
191+ $ this ->geolocateIcon = $ geolocateIcon ;
192+
193+ return $ this ;
194+ }
195+
196+ public function getGeolocateIcon (): string
197+ {
198+ return $ this ->evaluate ($ this ->geolocateIcon );
199+ }
200200
201201 /**
202202 * Optionally provide an array of field names and format strings as key and value, if you would like the map to reverse geocode
@@ -283,19 +283,19 @@ public function getPlaceField(): string|null
283283 return $ this ->evaluate ($ this ->placeField ) ?? 'formatted_address ' ;
284284 }
285285
286- public function getSuffixAction (): ?Action
287- {
288- if ($ this ->getGeolocate ()) {
289- return Action::make ('geolocate ' )
290- ->iconButton ()
291- ->icon ($ this ->getGeolocateIcon ())
292- ->extraAttributes (['id ' => $ this ->getId () . '-geolocate ' ]);
293- }
294-
295- return null ;
296- }
297-
298- protected function setUp (): void
286+ public function getSuffixAction (): ?Action
287+ {
288+ if ($ this ->getGeolocate ()) {
289+ return Action::make ('geolocate ' )
290+ ->iconButton ()
291+ ->icon ($ this ->getGeolocateIcon ())
292+ ->extraAttributes (['id ' => $ this ->getId (). '-geolocate ' ]);
293+ }
294+
295+ return null ;
296+ }
297+
298+ protected function setUp (): void
299299 {
300300 parent ::setUp ();
301301
0 commit comments