mikebronner/nova-map-marker-field

The field doesn't shown in create form

khaledzag opened this issue · 8 comments

The map field doesn't shown in creation form !!

MapMarker::make('Location')
                ->latitude('latitude')
                ->longitude('longitude')
                ->defaultZoom(8)
                ->defaultLatitude(41.823611)
                ->defaultLongitude(-71.422222)
                ->rules(['required'])

composer.json

        "genealabs/nova-map-marker-field": "^0.1.16",
        "laravel/framework": "^7.0",

nova version v3.3.2

@mikebronner

Thanks, I will try to replicate this.

@khaledzag I am unable to replicate the issue. Can you provide more details? Error logs, stack traces, browser console errors, etc.

@mikebronner here is the console error :

TypeError: "this.field.value is null"
    setInitialValue http://zz.test/nova-api/scripts/nova-map-marker-field:1
    mapCenter http://zz.test/nova-api/scripts/nova-map-marker-field:1
    get http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    evaluate http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    yn http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    v http://zz.test/nova-api/scripts/nova-map-marker-field:1
    _render http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    mount http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    get http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    hn http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    mount http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    $mount http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    $mount http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    init http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1
    d http://zz.test/vendor/nova/vendor.js?id=f9725df909a5af18907e:1

@khaledzag Can you provide a test repo that replicates the problem? Unfortunately the console error doesn't provide additional information that would help figure out what's wrong on its own.

@mikebronner here is the migration for latitude and longitude fields

            $table->float('latitude',10, 7);
            $table->float('longitude',10, 7);

@khaledzag Sorry, I really need a full test repository. I am unable to reproduce the issue with just Nova and this package..

fixed with nova 3.4.1 version