mikebronner / nova-map-marker-field

Provides an visual interface for editing latitude and longitude coordinates.
MIT License
131 stars 36 forks source link

The field doesn't shown in create form #38

Closed khaledzag closed 4 years ago

khaledzag commented 4 years ago

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

mikebronner commented 4 years ago

Thanks, I will try to replicate this.

mikebronner commented 4 years ago

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

khaledzag commented 4 years ago

@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
mikebronner commented 4 years ago

@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.

khaledzag commented 4 years ago

@mikebronner here is the migration for latitude and longitude fields

            $table->float('latitude',10, 7);
            $table->float('longitude',10, 7);
mikebronner commented 4 years ago

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

khaledzag commented 4 years ago

fixed with nova 3.4.1 version

mikebronner commented 4 years ago

@khaledzag Awesome!