|
| 1 | +<x-dynamic-component :component="$getEntryWrapperView()" :entry="$entry"> |
| 2 | + @php |
| 3 | + $statePath = $getStatePath(); |
| 4 | + @endphp |
| 5 | + |
| 6 | + <div |
| 7 | + x-ignore |
| 8 | + ax-load |
| 9 | + ax-load-src="{{ \Filament\Support\Facades\FilamentAsset::getAlpineComponentSrc('filament-google-maps-field', 'cheesegrits/filament-google-maps') }}" |
| 10 | + x-data="filamentGoogleMapsField({ |
| 11 | + state: $wire.entangle('{{ $getStatePath() }}'), |
| 12 | + setStateUsing: (path, state) => { |
| 13 | + return $wire.set(path, state) |
| 14 | + }, |
| 15 | + getStateUsing: (path) => { |
| 16 | + return $wire.get(path) |
| 17 | + }, |
| 18 | + reverseGeocodeUsing: (results) => { |
| 19 | + $wire.reverseGeocodeUsing(@js($statePath), results) |
| 20 | + }, |
| 21 | + placeUpdatedUsing: (results) => { |
| 22 | + $wire.placeUpdatedUsing(@js($statePath), results) |
| 23 | + }, |
| 24 | + autocomplete: @js($getAutocompleteId()), |
| 25 | + autocompleteReverse: @js($getAutocompleteReverse()), |
| 26 | + geolocate: @js($getGeolocate()), |
| 27 | + geolocateOnLoad: @js($getGeolocateOnLoad()), |
| 28 | + geolocateLabel: @js($getGeolocateLabel()), |
| 29 | + draggable: @js($getDraggable()), |
| 30 | + clickable: @js($getClickable()), |
| 31 | + defaultLocation: @js($getDefaultLocation()), |
| 32 | + statePath: @js($getStatePath()), |
| 33 | + controls: @js($getMapControls(false)), |
| 34 | + layers: @js($getLayers()), |
| 35 | + reverseGeocodeFields: @js($getReverseGeocode()), |
| 36 | + hasReverseGeocodeUsing: @js($getReverseGeocodeUsing()), |
| 37 | + hasPlaceUpdatedUsing: @js($getPlaceUpdatedUsing()), |
| 38 | + defaultZoom: @js($getDefaultZoom()), |
| 39 | + types: @js($getTypes()), |
| 40 | + countries: @js($getCountries()), |
| 41 | + placeField: @js($getPlaceField()), |
| 42 | + drawingControl: @js($getDrawingControl()), |
| 43 | + drawingControlPosition: @js($getDrawingControlPosition()), |
| 44 | + drawingModes: @js($getDrawingModes()), |
| 45 | + drawingField: @js($getDrawingField()), |
| 46 | + geoJson: @js($getGeoJsonFile()), |
| 47 | + geoJsonField: @js($getGeoJsonField()), |
| 48 | + geoJsonProperty: @js($getGeoJsonProperty()), |
| 49 | + geoJsonVisible: @js($getGeoJsonVisible()), |
| 50 | + debug: @js($getDebug()), |
| 51 | + gmaps: @js($getMapsUrl()), |
| 52 | + mapEl: $refs.map, |
| 53 | + pacEl: $refs.pacinput, |
| 54 | + polyOptions: @js($getPolyOptions()), |
| 55 | + circleOptions: @js($getCircleOptions()), |
| 56 | + rectangleOptions: @js($getRectangleOptions()) |
| 57 | + })" |
| 58 | + id="{{ $getId() . '-alpine' }}" |
| 59 | + wire:ignore |
| 60 | + > |
| 61 | + @if ($isSearchBoxControlEnabled()) |
| 62 | + <input x-ref="pacinput" type="text" placeholder="Search Box" /> |
| 63 | + @endif |
| 64 | + |
| 65 | + <div |
| 66 | + x-ref="map" |
| 67 | + class="w-full" |
| 68 | + style=" |
| 69 | + height: {{ $getHeight() }}; |
| 70 | + min-height: 30vh; |
| 71 | + z-index: 1 !important; |
| 72 | + " |
| 73 | + ></div> |
| 74 | + </div> |
| 75 | +</x-dynamic-component> |
0 commit comments