Hi guys , I have a problem...
I created a context menu when I right click in the map...
So, the context menu open with several options:
- Zoom in ...
- Zoom out ...
- Query...


My problem is to execute WMSGetFeatureInfo when the user select the option
"Query..." in context menu...

My code:
   //Query WMS
   var _infoWMS = new OpenLayers.Control.WMSGetFeatureInfo({
        layers: [myLayer],
        queryVisible: true,
        infoFormat: 'text/html'
    });

    _infoWMS.events.register("getfeatureinfo", map, showInfo);

  //ContextMENU

   jQuery(map.div).jeegoocontext('menu', {
                widthOverflowOffset: 0,
                heightOverflowOffset: 3,
                submenuLeftOffset: -4,
                submenuTopOffset: -5,
                onSelect: function(e, context){
                   switch(jQuery(this).attr('id'))
                    {
                        case 'ZoomIn':

 map.setCenter(map.getLonLatFromPixel(pos),map.getZoom() +1);
                            break;
                        case 'ZoomOut':

 map.setCenter(map.getLonLatFromPixel(pos),map.getZoom() -1);
                            break;
                        case 'Query':
                           ??????    *<======== HOW EXECUTE _infoWMS HERE?*
                            break;
                    }
                }
            });

Paul
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to