首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 企业软件 > 行业软件 >

利用OpenLayers怎样实现定位查询?该如何处理

2012-02-22 
利用OpenLayers怎样实现定位查询?通常在WebGIS中都能够实现类似于用户输入待查找的对象的名称,查询到符合

利用OpenLayers怎样实现定位查询?
通常在WebGIS中都能够实现类似于用户输入待查找的对象的名称,查询到符合条件的对象后,会在目标位置添加一个标记。
假设待查询对象名称存储在变量Name中,请问利用OpenLayers怎样实现这个定位查询?请高手指点!小女先在此表示衷心的感谢啦。

[解决办法]
1. On the server side, expose a WMS service.
2. On the client side, Define a Marker Layer in the OpenLayers layer stack
3. Send request=GetFeatureInfo to the WMS on the Marker Layer.
4. Create a new marker according to the mouse click and add this feature to the Marker layer. 
5. Parse the returning in the response.responseText from the server and display the attributes.

热点排行