【发布时间】:2015-10-08 02:26:51
【问题描述】:
Google maps place 服务无法正常工作并给出下一个错误
未捕获的错误:属性半径无效。一个可能的原因是该值与其他属性冲突。
代码
var service = new google.maps.places.PlacesService(map);
var request = {
location: centerLatLong,
rankBy: google.maps.places.RankBy.DISTANCE,
radius: 500
};
service.nearbySearch(request, function(results, status){
if (status == google.maps.places.PlacesServiceStatus.OK){
console.log(results)
}
});
【问题讨论】:
-
service.nearbySearch() 中的
reque'enter code here'st是什么意思?
标签: javascript google-maps google-maps-api-3 google-places-api