当前位置: 代码迷 >> GIS >> 利用OpenLayers怎样实现定位查询?该如何处理
  详细解决方案

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

热度:430   发布时间:2016-05-05 06:39:22.0
利用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.
  相关解决方案