地编码器-arcgis-geojson
我们的JavaScript库的重复使用的Isomorphic地理编码. 此库的构建是为了匹配 地理编码-arcgis 以便快速转换我们的应用 使用ESRI的地理编码器。 读取 ESRI 文件 这里。坐标必须是任何可以由 龙龙。 。 。 .
实例
所有 API 方法( 自动完成除外) 接受选项 clientId, (中文(简体) ), clientSecret 财务报告和审定财务报表 forStorage时 forStorage,则 clientId 财务报告和审定财务报表 clientSecret 需要选项.
Autocomplete
import {autocomplete} from 'geocoder-arcgis-geojson'
autocomplete({
boundary: {
rect: {
minLon: minLon,
minLat: minLat,
maxLon: maxLon,
maxLat: maxLat
}
},
focusPoint: {lat: 39.7691, lon: -86.1570},
text: '1301 U Str'
}).then((result) => {
console.log(result)
}).catch((err) => {
console.error(err)
})
Bulk
import {autocomplete} from 'geocoder-arcgis-geojson'
bulk({
addresses: [
'1301 U Str',
'123 Main St'
],
boundary: {
rect: {
minLon: minLon,
minLat: minLat,
maxLon: maxLon,
maxLat: maxLat
}
},
clientId: 'secret',
clientSecret: 'secret',
focusPoint: {lat: 39.7691, lon: -86.1570}
}).then((result) => {
console.log(result)
}).catch((err) => {
console.error(err)
})
Reverse
import {reverse} from 'geocoder-arcgis-geojson'
reverse({
point: {
lat: 39.7691,
lng: -86.1570
}
}).then((result) => {
console.log(result)
}).catch((err) => {
console.error(err)
})
search({apiKey, text, ...options})
import {search} from 'geocoder-arcgis-geojson'
search({
text: '1301 U Street NW, Washington, DC',
focusPoint: {lat: 39.7691, lon: -86.1570},
boundary: {
rect: {
minLon: minLon,
minLat: minLat,
maxLon: maxLon,
maxLat: maxLat
}
}
}).then((geojson) => {
console.log(geojson)
}).catch((err) => {
console.error(err)
})
API 密码
目录
自动补全
使用 爱斯理的 建议 服务。 此服务不返回 Geijson , 而是返回列表 地址建议和相应的魔法钥匙
参数
$0对象
回返 答应 保证能以建议的结果解决
批量
使用 : 爱斯理的 地理编码地址 服务.
参数
$0对象
回返 答应 保证用大块地码结果解决
倒转
使用 爱斯理的 倒转吉奥码 服务.
参数
$0对象
回返 答应 以反向地理码结果解决的承诺
搜索
使用 爱斯理的 寻找地址 服务.
参数
$0对象
回返 答应 保证通过搜索结果解决