File tree Expand file tree Collapse file tree 2 files changed +203
-192
lines changed
app/Filament/Forms/Components Expand file tree Collapse file tree 2 files changed +203
-192
lines changed Original file line number Diff line number Diff line change @@ -104,9 +104,11 @@ public function getChildComponents(): array
104104 ->live ()
105105 ->hiddenLabel ()
106106 ->liveLocation ()
107+ ->visible (fn (Get $ get ) => $ get ('location.lat ' ) && $ get ('location.lng ' ))
108+ ->defaultLocation (45.9432 , 24.9668 )
107109 ->zoom (18 )
108110 ->draggable (false )
109- ->showMyLocationButton ()
111+ ->showMyLocationButton (false )
110112 ->hintAction (
111113 Action::make ('change_pin_location ' )
112114 ->label (__ ('map_points.change_pin_location ' ))
@@ -119,6 +121,8 @@ public function getChildComponents(): array
119121 ->tilesUrl ('https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png ' )
120122 ->label (__ ('map_points.new_point ' ))
121123 ->liveLocation ()
124+ ->showMyLocationButton (false )
125+
122126 ->live ()
123127 ->afterStateUpdated (function (?array $ state , Set $ set ) {
124128 $ set ('new_lat ' , $ state ['lat ' ]);
You can’t perform that action at this time.
0 commit comments