Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/376.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 回调js Google为空_Javascript_Maps - Fatal编程技术网

Javascript 回调js Google为空

Javascript 回调js Google为空,javascript,maps,Javascript,Maps,Im具有js功能,她根据邮政编码计算纬度和经度: 函数GetLocation(adr,回调){ var地址=adr; var geocoder=new google.maps.geocoder(); geocoder.geocode({'address':address},函数(结果,状态){ if(status==google.maps.GeocoderStatus.OK){ var latitude=results[0]。geometry.location.lat(); var longi

Im具有js功能,她根据邮政编码计算纬度和经度:

函数GetLocation(adr,回调){ var地址=adr; var geocoder=new google.maps.geocoder(); geocoder.geocode({'address':address},函数(结果,状态){ if(status==google.maps.GeocoderStatus.OK){ var latitude=results[0]。geometry.location.lat(); var longitude=results[0]。geometry.location.lng(); //console.log([纬度,经度]) 回调([纬度,经度]); }否则{ 返回“请求失败。”; } }); }