Problem with filament-google-maps

@Hugh Messenger When I edit an existing entry the lat and long are right in the Textfield but the Map not starting at the existing lat and long
TextInput::make('lat')
->reactive()
->afterStateUpdated(function ($state, callable $get, callable $set) {
$set('location', [
'lat' => floatVal($state),
'long' => floatVal($get('long')),
]);
})
->lazy(), // important to use lazy, to avoid updates as you type
TextInput::make('long')
->reactive()
->afterStateUpdated(function ($state, callable $get, callable $set) {
$set('location', [
'lat' => floatval($get('lat')),
'long' => floatVal($state),
]);
})
->lazy(), // important to use lazy, to avoid updates as you type
Map::make('location')
->reactive()
->afterStateUpdated(function ($state, callable $get, callable $set) {
$set('lat', $state['lat']);
$set('long', $state['lng']);
}),
TextInput::make('lat')
->reactive()
->afterStateUpdated(function ($state, callable $get, callable $set) {
$set('location', [
'lat' => floatVal($state),
'long' => floatVal($get('long')),
]);
})
->lazy(), // important to use lazy, to avoid updates as you type
TextInput::make('long')
->reactive()
->afterStateUpdated(function ($state, callable $get, callable $set) {
$set('location', [
'lat' => floatval($get('lat')),
'long' => floatVal($state),
]);
})
->lazy(), // important to use lazy, to avoid updates as you type
Map::make('location')
->reactive()
->afterStateUpdated(function ($state, callable $get, callable $set) {
$set('lat', $state['lat']);
$set('long', $state['lng']);
}),
4 Replies
Brian Kidd
Brian Kidd16mo ago
There’s a channel specific to Google maps plugin - #google-maps
cheesegrits
cheesegrits16mo ago
Just to confirm he has re-asked it in my channel.
GeRaged | Niklas
GeRaged | NiklasOP16mo ago
yes but got no answer
cheesegrits
cheesegrits16mo ago
Sorry, I had a couple of client deadlines on Friday. I have some time later today. This is still the wrong place to ask / bump plugin questions.
Want results from more Discord servers?
Add your server