我可以下载地址,城市,州,邮政编码 - 纬度/经度信息,可以单独加载到数据库中.也可以对它们的准确性和覆盖范围进行评论.
我想所有的GPS设备都这样做..任何我可以提取此信息的指针??
我试过谷歌地图json api ..并且不喜欢他们的速率限制每秒请求数量的想法..
谢谢,Ramya
编辑:我正在寻找的是"地址,城市,州,邮政编码,纬度/经度"在csv或转储..我可以在本地查询..当然..免费(非商业).
我想知道是否有可能使用googlemaps api同步地进行地理编码,因此不会等待调用回调函数,而是等待返回值.有没有人找到办法做这样的事情.
PS:我正在使用api的第3版
获取给定国家/地区的给定邮政编码的坐标(纬度/经度)的最完整,最精确和最可靠的方法是什么?我需要提出很多请求,因此API限制率很高(甚至可能不存在)会很有用.
GeoNames转储很酷,但似乎有太多重复的坐标(示例),并且它们的数据库似乎也缺少特定国家/地区的一些ZIP /邮政编码.
还有其他(可靠的)替代品吗?
在我阅读Meta问题时,我遇到了这个链接:
http://query.yahooapis.com/v1/public/yql?q=select%20%2A%20from%20geo.places%20where%20text%3D%22Jyv%C3%A4skyl%C3%A4%22&format=xml
Run Code Online (Sandbox Code Playgroud)
我之前听说过YQL,但我不知道我可以将它用于GeoCode地址,所以我搜索了一下,我发现了这个非常有趣的信息:
使用限制
每个应用程序限制(由您的访问密钥标识):每天100,000个呼叫
每IP限制:/ v1/public /:每小时1,000次通话;/v1/yql /:每小时10,000次呼叫
有谁知道在哪里可以获得使用YQL到GeoCode地址的更具体信息?
我有这个代码,它是在加载时启动的
// Display the map
function map_it() {
var myLatlng = new google.maps.LatLng(13.005621, 77.577531);
var myOptions = {
zoom: zoomLevel,
center: myLatlng,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP,
navigationControl: true,
navigationControlOptions: {
style: google.maps.NavigationControlStyle.SMALL
}
}
map = new google.maps.Map(document.getElementById("map-it"), myOptions);
var marker = new google.maps.Marker({
position: myLatlng,
map: map,
draggable: true
});
google.maps.event.addListener(marker, 'dragend', function (event) {
document.getElementById('mapLat').value = marker.getPosition().lat();
document.getElementById('mapLng').value = marker.getPosition().lng();
geocodePosition(marker.getPosition());
});
}
function geocodePosition(pos) {
geocoder.geocode({
latLng: pos
}, function (responses) {
if (responses && responses.length > …Run Code Online (Sandbox Code Playgroud) 我正在将CodePlex的地理坐标类集成到我的个人"工具箱"库中.此类使用float字段来存储纬度和经度.
自从类GeoCoordinate实现以来IEquatable<GeoCoordinate>,我习惯性地编写了Equals这样的方法:
public bool Equals(GeoCoordinate other)
{
if (other == null) {
return false;
}
return this.latitude == other.latitude && this.longitude == other.longitude;
}
Run Code Online (Sandbox Code Playgroud)
在这一点上,我停下来,并认为我正在比较浮点变量的相等性,这通常是禁忌.我的思考过程大致如下:
我只能设想一次设置Latitude和Longitude属性,这意味着不会累积任何错误来搞砸我的比较.
另一方面,写(尽管没有意义)是可能的
var geo1 = new GeoCoordinate(1.2, 1.2);
var geo2 = new GeoCoordinate(1.2, 1.2);
// geo1.Equals(geo2) will definitely be true, BUT:
geo2.Latitude *= 10;
geo2.Latitude /= 10;
// I would think that now all bets are off
Run Code Online (Sandbox Code Playgroud)
当然,这不是我能想象到的,但如果类的公共接口允许它,那么它Equals应该能够处理它.
使用difference < …
我有两个设备.一个是HTC WildFire S,另一个是HTC 1V.我Geocoder.getFromLocationName()在我的应用程序中使用了它.它在HTC野火S中成功运行.但在HTC 1V我得到以下错误.为什么会来?我怎么解决这个问题?请任何人帮助我.
码
Geocoder geoCoder = new Geocoder(getBaseContext(), Locale.getDefault());
//s is the address
List<Address> addresses = geoCoder.getFromLocationName(s, 5); //Here i got the following Exception.
Run Code Online (Sandbox Code Playgroud)
错误
06-18 16:28:17.933: W/System.err(4960): java.io.IOException: Service not Available
06-18 16:28:17.953: W/System.err(4960):at android.location.Geocoder.getFromLocationName(Geocoder.java:178)
Run Code Online (Sandbox Code Playgroud)
位置标签

Geocoding v2 API意外停止.
例如 http://maps.google.com/maps/geo?q=27703&output=json&key=AIzaSyBVr3n3IVZzakGvtIWeRaJEXsC63JHZ0w8
从API开始,我无法获得lat.服务器的输出是:
{
"Status": {
"code": 610,
"request": "geocode"
}
}
Run Code Online (Sandbox Code Playgroud)
我搜索status: 610但找不到任何相关信息.
谢谢.
我试图从地址获得纬度和经度,问题是...当我只提供城市名称而不是给我正确的纬度和经度,当我给出完整的地址(如州,城市名称,街道号)比它不给我正确的纬度和经度......
谢谢你的合作回应......
我的代码是......
//String addressStr = "faisalabad";/// this give me correct address
String addressStr = "Sainta Augustine,FL,4405 Avenue A";
Geocoder geoCoder = new Geocoder(MapClass.this, Locale.getDefault());
try {
List<Address> addresses =
geoCoder.getFromLocationName(addressStr, 1);
if (addresses.size() > 0) {
latitude = addresses.get(0).getLatitude(); longtitude =
addresses.get(0).getLongitude(); }
} catch (IOException e) { // TODO Auto-generated catch block
e.printStackTrace(); }
pos = new LatLng(latitude, longtitude);
googleMap.addMarker(new MarkerOptions().icon(
BitmapDescriptorFactory
.defaultMarker(BitmapDescriptorFactory.HUE_RED))
.position(pos));
googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(pos, 15));
googleMap.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null);
Run Code Online (Sandbox Code Playgroud) 我已经阅读了很多关于这部分的内容,我发现的是编写地理编码并搜索推文,例如 https://api.twitter.com/1.1/search/tweets.json?geocode=37.781157,-122.398720,1mi&count = 10
根据我在twitter网站上找到的内容返回位于给定纬度/经度的给定半径内的用户的推文.使用半径修改器时,将考虑最多1,000个不同的"子区域".示例值:37.781157,-122.398720,1mi
问题!,我们如何定义或绘制纬度和经度?我已经尝试了谷歌地图,但我只得到一点,然后我可以在这一点附近添加里程,但这还不够,我希望整个国家被包括在内,这可能吗?
我有一些代码,我正在从API v2移植到v3.在旧代码中,我们有一个准确性字段,它返回到xml中(不确定名称,但确实代表了各种类型的置信度).在新的API中,我没有看到任何类似的字段.
如果我把"俄勒冈州,美国"放入搜索领域,我会得到5场比赛.前两个是"俄勒冈州,美国"和"俄勒冈州,俄亥俄州,美国".他们都有"partial_match"= false.这似乎不对,一个似乎是偏袒的,一个不是.另外,他们都回来了相同的"location_type"(APPROXIMATE).实际上,所有匹配都显示为非局部且具有相同的位置类型.
我的问题是,结果集中的任何字段是否都会对结果的准确性产生某种信心?在我的示例中,看起来似乎一个结果比任何其他结果更准确 - 以至于输入字符串与返回的QuickAddress字段完全匹配.
geocoding ×10
google-maps ×4
android ×2
android-maps ×2
geolocation ×2
c# ×1
country ×1
equality ×1
maps ×1
postal-code ×1
python ×1
tweets ×1
twitter ×1
web-services ×1
zipcode ×1