[OpenLayers-Users] getfeature info when feature overlay the wms layer

adityakumar529 adityakumar529 at gmail.com
Wed Jul 3 22:15:35 PDT 2013


HI Raffaele/Rich,
   My concern is how to active the getfeatureinfo when my point touches the
WMS layer.
I need the same functionality when I am dragging the point, which I have
achieved in the following way.

var drag=new OpenLayers.Control.DragFeature(vectorLayer,{    
	    onComplete:function(e) {	
		var lonlat =
map.getLonLatFromPixel(map.getControlsByClass("OpenLayers.Control.MousePosition")[0].lastXy).transform(new
OpenLayers.Projection("EPSG:900913"), new
OpenLayers.Projection("EPSG:4326"));	 
		alert(lonlat);
		var roadidPicker = new OpenLayers.Control.WMSGetFeatureInfo({
		url: 'http://localhost:8080/geoserver/aditya/wms', 
		
		title: 'identify features on click',
		//layers: [BBMP],
		queryVisible: true,
		});
		roadidPicker.infoFormat = 'application/vnd.ogc.gml';
		roadidPicker.events.register("getfeatureinfo", this, pickRoadid);
		//alert (taa);
		map.addControl(roadidPicker);
		roadidPicker.activate();
	    
	    }
	});

Thanks
Aditya Kumar



-----
GIS Developer
India Urban Space Foundation
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/getfeature-info-when-feature-overlay-the-wms-layer-tp5063889p5063961.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list