Skip to content

Commit 917dcde

Browse files
committed
Adding infolist doc
1 parent 4d174ee commit 917dcde

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

README.md

+29
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ with optional reverse geocoding of address components.
7777

7878
![Geocomplete Field](images/form-geocode.png)
7979

80+
### Infolist Field
81+
82+
The **MapEntry** Infolist field displays a (read only) map showing a single pin. This is currently WIP, features
83+
and functionality (like KML layers, GeoJSON drawings, etc) to be added soon.
84+
85+
![Infolist Field](images/infolist.png)
86+
8087
### Map Widget
8188

8289
The **MapWidget** displays a filterable set of locations from a model, with
@@ -651,6 +658,28 @@ provide your own closure for handling reverse geocode data, as described in the
651658
The Geocomplete field also offers many of the same features as Filament's TextInput,
652659
like prefixes, suffixes, placeholders, etc.
653660

661+
### Infolist Field
662+
663+
The Infolist field displays a read-only map with a single field showing the field's location.
664+
665+
```php
666+
use Cheesegrits\FilamentGoogleMaps\Infolists\MapEntry;
667+
668+
//
669+
670+
public function infolist(Infolist $infolist): Infolist
671+
{
672+
return $infolist->schema([
673+
TextEntry::make('street'),
674+
TextEntry::make('city'),
675+
TextEntry::make('state'),
676+
TextEntry::make('zip'),
677+
MapEntry::make('location')
678+
->columnSpan(2),
679+
]);
680+
}
681+
```
682+
654683
### Form WidgetMap Field
655684

656685
If you need to display multiple markers in a map on a form, you can use the WidgetMap field. This is a cut down version

images/infolist.png

1.24 MB
Loading

0 commit comments

Comments
 (0)