openlayers中单击获取要素

openlayers中单击获取要素,以前在做arcgis js开发的时候,就开始纠结单击获取要素使用哪种方法,当时是因为arcgis server正好提供了arcgis定制的服务IdentifyTask,所以当时用了arcgis server查询的。