laravel-admin-extensions / latlong

A latitude & longitude selector
MIT License
69 stars 35 forks source link

ViewException In latlong.blade.php line 17 #34

Closed tingfeng-key closed 4 years ago

tingfeng-key commented 4 years ago
 ViewException In latlong.blade.php line 17 :
  Undefined variable: provider (View: /app/vendor/laravel-admin-ext/latlong/resources/views/latlong.blade.php)

版本信息:

laravel-admin: 1.8.*
laravel-admin-extensions: 1.2

修改Latlong.php文件中reader方法可解决此问题:

public function render()
    {
        $this->script = Extension::getProvider()
            ->setParams([
                'zoom' => $this->zoom
            ])
            ->setAutoPosition($this->autoPosition)
            ->applyScript($this->id);

        $variables = [
            'height'   => $this->height,
            'provider' => Extension::config('default'),
        ];
        $this->addVariables($variables);

        return parent::fieldRender($variables);
    }
z-song commented 4 years ago

已经修复