【发布时间】:2017-01-09 07:27:46
【问题描述】:
我希望通过谷歌地图的地点API调用附近:
当我调用上面的链接时,它给出了结果,但是当我将上面的链接更改为下面的链接时
latitude=17.4359;longitude=78.3417 链接在位置结果数组附近没有给出。
我们不能发送纬度,经度动态吗?
我的代码是:
let latitude=this.lat;
let longitude= this.lng
return this.http.get('https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=latitude,longitude&radius=5000&type=school&sensor=false&key=Key')
.map(response=>response.json())
.subscribe(data=>{
// console.log("sucess "+JSON.stringify(data.results))
this.schools=data.results
console.log("school length "+this.schools.length)}}
【问题讨论】:
标签: angular google-maps-api-3 google-api