GeoHey API.JS 1.2.0

在线文档:http://dist.geohey.com/g-api.js/1.2.0/doc/index.html

在线JS库文件:http://dist.geohey.com/g-api.js/1.2.0/g-api.min.js

离线包下载:http://dist.geohey.com/g-api.js/g-api-js-1.2.0.zip

更新日志
  • 添加 dataviz 服务支持
  • 给 data 和 pubdata 服务添加returnGeometry选项
使用示例
<!doctype html>
<html>
<head>
	<meta charset='utf-8'>
</head>
<body>
	<script src="http://dist.geohey.com/g-api.js/latest/g-api.min.js"></script>
	<script>
		var GAPI = require('GAPI');
		GAPI.init('OGJ9OGI4YzAyNmJhNDI3Y2FmOWRmNjBlMTdhZiM4NmM'); // 浏览器访问凭证

		GAPI.geocoding.geocode('鼓楼', {
			admin: '北京'
		}, function(data) {
			console.log(data);
		}, function(error) {
			console.error(error);
		});
	</script>
</body>
</html>