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

Default Location Button #8

Closed saelco closed 6 months ago

saelco commented 6 months ago

Hi, Can a Default Location button be added? For example, I save a location point, say lat:xxxx and long:yyyy, and make it the default location in the database. Then, I edit that data and move the map location to lat:mmmm and long:nnnn. If I want to return to the default location without refreshing the page, I'll find it difficult, so I need a button to do that.

mohaphez commented 6 months ago

Hi Dear @saelco

Certainly! After merging #5 and releasing the new version, you'll be able to update the map using the refreshMap() event. Below is an example code snippet:

image

image

Should you have any further suggestions, please do not hesitate to inform us. We warmly welcome them.

Thanks,

saelco commented 6 months ago

Thank you for the response that makes this plugin even better.