计算机应用 ›› 2011, Vol. 31 ›› Issue (05): 1450-1452.DOI: 10.3724/SP.J.1087.2011.01450

• 典型应用 • 上一篇    

基于Google地图API的空间信息发布

周宇林,付忠良   

  1. 中国科学院 成都计算机应用研究所,成都 610041
  • 收稿日期:2010-12-01 修回日期:2011-01-18 发布日期:2011-05-01 出版日期:2011-05-01
  • 通讯作者: 周宇林
  • 作者简介:周宇林(1987-),男,湖北荆州人,硕士,主要研究方向:图像处理、测绘、地理信息系统;付忠良(1967-),男,重庆人,研究员,博士生导师,主要研究方向:图像处理、数据挖掘、机器学习。
  • 基金资助:

    四川省科技支撑计划项目(2009SZ0214)。

Release of spatial information based on Google Maps API

ZHOU Yu-lin, FU Zhong-liang   

  1. Chengdu Institute of Computer Application, Chinese Academy of Sciences, Chengdu Sichuan 610041, China
  • Received:2010-12-01 Revised:2011-01-18 Online:2011-05-01 Published:2011-05-01
  • Contact: Karl Zhou

摘要: 传统的在线地图服务具有一定的局限性——仅支持客户浏览和查询,为了实现客户端自主录入数据,服务器端接收空间信息并发布到在线地图的目标,提出了一种构建空间信息发布系统的新技术。该技术基于B/S模式架构,通过改进Google Maps API的事件侦听器,自动获取标注处地理坐标,服务器端使用一种自定义的XML文件读取录入数据,然后利用地址解析函数解析该XML文件,将含有位置信息的数据标注到Google地图上,从而实现了本地属性数据在Web地图上的发布。基于该方法成功开发了武汉大学校园导航系统,验证了该方法的可行性。

null

关键词: Web GIS, 事件侦听, XML文件解析, 地址解析, Google Maps API

Abstract: Traditional online mapping service has certain deficiency, which only supports customers to browse and query. In order to achieve the target that client could independently input data, and the server automatically receives spatial information and releases online map, a new method for the construction of spatial information distribution system was proposed is this paper. Based on B/S architecture, this method could get the geographical coordinates automatically by improving the Google Maps API event listener; meanwhile, a self-defined XML file was used to read this kind of record on the server. Then the address resolution functions were used to analyze this kind of XML file and draw the markers on the Google map according to the locations. Through this process the goal of publishing the local data to the Web map was achieved. Based on this method Wuhan University campus navigation system has been developed successfully, which demonstrates the feasibility of this solution.

Key words: Web GIS, event listener, XML document analysis, address resolution, Google Maps API