Closed Dontorpedo closed 2 years ago
Can you try the latest version? (v1.1)
Can you try the latest version? (v1.1)
i can install the package, created a widget and added it into my viewpage but unfortunately nothing shows up :(
seems like the whole markers part is missing in the view
The map is displayed correctly? only markers dont show up?
Can you share your widget code?
no, only heading and footer are working.. maps doesnt show up..
`namespace App\Filament\Resources\ObjectResource\Widgets;
use App\Filament\Resources\ObjectResource; use Illuminate\Contracts\Support\Htmlable; use Webbingbrasil\FilamentMaps\Actions; use Webbingbrasil\FilamentMaps\Marker; use Webbingbrasil\FilamentMaps\Widgets\MapWidget;
class MapLocation extends MapWidget {
public static string $resource = ObjectResource::class;
protected int | string | array $columnSpan = 1;
protected bool $hasBorder = false;
protected array $mapOptions = ['center' => [0, 0], 'zoom' => 2];
public string | Htmlable | null $heading = "Karte";
public string | Htmlable | null $footer = "Mehr infos";
public $record;
public function getMarkers(): array
{
return [
Marker::make('pos2')->lat(-15.7942)->lng(-47.8822)->popup('Hello Brasilia!'),
// Marker::make($this->record->id)->lat($this->record->lat)->lng($this->record->lng)->popup('Hello Brasilia!'),
];
}
public function getActions(): array
{
return [
Actions\ZoomAction::make(),
Actions\CenterMapAction::make()->zoom(2),
];
}`
I think the scripts needed for the map are not loading. The plugin adds some scripts to be added to the renderHook scripts.start
.
Are you modifying some filament base template or using a custom theme?
Can you checks in the inspector's network tab if the leaflet.js
is being loaded?
no the filament files are not modified, i use the widget on a regural ressource view..
yeah, leaflet.js is loaded
found the error, in your widgets/maps.blade.php file at line 32, removing the line makes the map work normaly..
found the error, in your widgets/maps.blade.php file at line 32, removing the line makes the map work normaly..
hmm, got it. I made a draft PR #10 , can you verify that this way it works correctly?
Files changed https://github.com/webbingbrasil/filament-maps/pull/10/files
found the error, in your widgets/maps.blade.php file at line 32, removing the line makes the map work normaly..
hmm, got it. I made a draft PR #10 , can you verify that this way it works correctly?
Files changed https://github.com/webbingbrasil/filament-maps/pull/10/files
Yeah, map works correctly with those changes. :)
ok, I released a new version with the fix.
Describe the bug Failed to extract webbingbrasil/filament-maps: (7) "C:\Program Files\7-Zip\7z.EXE" x -bb0 -y C:\laragon\laragon\www\filament\vendor\composer\tmp-33f29d6ab723237166ffa16be139db2e -oC:\laragon\laragon\www\filament\vendor\composer\6b467032
[RuntimeException] The archive may contain identical file names with different capitalization (which fails on case i nsensitive filesystems): ZipArchive::extractTo(C:\laragon\laragon\www\filament/vendor/composer/6b 467032/webbingbrasil-filament-maps-9c9feb4\resources\svg/o-arrows-pointing-in.svg:Zone.Identifier ): Operation failed: No such file or directory
[ErrorException] ZipArchive::extractTo(C:\laragon\laragon\www\filament/vendor/composer/6b467032/webbingbrasil-fila ment-maps-9c9feb4\resources\svg/o-arrows-pointing-in.svg:Zone.Identifier): Operation failed: No s uch file or directory