通常在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.