用户定位
根据地址查询经纬度:
maps.googleapis.com/maps/api/geocode/json?address=SFO&sensor=false
根据经纬度查询地址:
maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=false
bounds的作用
maps.googleapis.com/maps/api/geocode/json?address=Winnetka&sensor=false
maps.googleapis.com/maps/api/geocode/json?address=Winnetka&bounds=34.172684,-118.604794|34.236144,-118.500938&sensor=false
region的作用
maps.googleapis.com/maps/api/geocode/json?address=Toledo&sensor=false
maps.googleapis.com/maps/api/geocode/json?address=Toledo&sensor=false®ion=es
addess:需要查询的地址
latlng:需要查询的经纬度
bounds:设定查询的边界
region:设定查询的国家代码
language:设定查询结果的语言
sensor:标示该请求是否来源于一个设备的传感器
获取MapsAPIKey
DebugKey的相关参数:
Keystorename:"debug.keyStore"
Keystorepassword:"android"
Keyalias:"androiddebugkey"
Keypassword:"android"
CN:"CN=AndroidDebug,O=Android,C=US"
94:96:97:07:3E:03:3E:3B:E1:63:F5:ED:CE:51:FB:56
code.google.com/android/maps-api-signup.html
申请流程:
code.google.com/android/add-ons/google-apis/mapkey.html