香港的 twitter4j geo streaming latitude/longitude
twitter4j geo streaming latitude/longitude for Hongkong
我正在尝试使用 twitter4j 的流媒体方法从香港地区捕获推文。但是,无论我选择什么纬度或经度坐标(来自http://www.latlong.net/convert-address-to-lat-long.html)我总是得到无效的latitude/longitude错误。
Latitude/longitude are not valid: 22.27, 114.17, 22.35, 114.21
我使用的代码在其他方面工作正常:
TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance();
FilterQuery fq = new FilterQuery();
fq.locations(
new double[][]{
new double[]{ 22.274286d, 114.166875d},
new double[]{22.351943d, 114.214683d}
});
twitterStream.addListener(listener);
twitterStream.filter(fq);
我错过了什么? latitude/longitude有什么限制吗?我已经注意让西南点在数组中排在第一位。
坐标应该是{southwestLon,southwestLat},{northeastLon,northeastLat}
https://dev.twitter.com/streaming/overview/request-parameters#locations
new double[][]{
new double[]{114.166875d, 22.274286d},
new double[]{114.214683d, 22.351943d}
}
我正在尝试使用 twitter4j 的流媒体方法从香港地区捕获推文。但是,无论我选择什么纬度或经度坐标(来自http://www.latlong.net/convert-address-to-lat-long.html)我总是得到无效的latitude/longitude错误。
Latitude/longitude are not valid: 22.27, 114.17, 22.35, 114.21
我使用的代码在其他方面工作正常:
TwitterStream twitterStream = new TwitterStreamFactory(cb.build()).getInstance();
FilterQuery fq = new FilterQuery();
fq.locations(
new double[][]{
new double[]{ 22.274286d, 114.166875d},
new double[]{22.351943d, 114.214683d}
});
twitterStream.addListener(listener);
twitterStream.filter(fq);
我错过了什么? latitude/longitude有什么限制吗?我已经注意让西南点在数组中排在第一位。
坐标应该是{southwestLon,southwestLat},{northeastLon,northeastLat}
https://dev.twitter.com/streaming/overview/request-parameters#locations
new double[][]{
new double[]{114.166875d, 22.274286d},
new double[]{114.214683d, 22.351943d}
}