dotswan / filament-map-picker

Map Picker is a Filament custom field designed to simplify the process of choosing a location on a map and obtaining its geo-coordinates.
MIT License
56 stars 13 forks source link

"Set Default Location" does not change position on map #11

Closed threecolors-lab closed 6 months ago

threecolors-lab commented 6 months ago

I have tried the example you provided, but when executed, only the value in the textboxes changes while the map does not. What could be the problem?

Before Set Default Location:

image

after Set Default Button:

image

I'm using this code:

use Filament\Forms\Components\Actions\Action; use Filament\Forms\Components\Actions; use Filament\Support\Enums\VerticalAlignment;

Actions::make([ Action::make('Set Default Location') ->icon('heroicon-m-map-pin') ->action(function (Set $set, $state, $livewire): void { $set('location', ['lat' => '52.35510989541003', 'lng' => '4.883422851562501']); $set('latitude', '52.35510989541003'); $set('longitude', '4.883422851562501'); $livewire->dispatch('refreshMap'); }) ])->verticalAlignment(VerticalAlignment::Start);

mohaphez commented 6 months ago

Hey @threecolors-lab,

We've sorted out the problem in version 1.1.2. Thanks for flagging it! If you're still stuck or have any other questions, just give us a shout.

Take care!