1.5版本中locale应该是zh-CN
对应的地图资源MAP.php应该修改为
public static function getAssets()
{
if (config('app.locale') == 'zh-CN') {
$js = 'http://map.qq.com/api/js?v=2.exp';
} else {
$js = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&key='.env('GOOGLE_API_KEY');
}
return compact('js');
}
还要考虑到 http 还是 https 的问题。
已经修复,谢谢
Most helpful comment
还要考虑到 http 还是 https 的问题。