You could use feature events instead of a SelectFeature control. See http://openlayers.org/dev/examples/feature-events.html to see how this is done.
Andreas. On Mon, Apr 14, 2014 at 3:36 PM, Frederick Löbig <[email protected]> wrote: > Hi all, > > I have a small problem which I think can be solved pretty quickly. > > The map I have as multiple different "clickControls", which, depending on > which one is activated, lead to several different actions. One of these > controls is a simple clickFeature, to show a detail window of the selected > vector feature (added via a GML file). I now want to use pinch zoom and > simple map dragging without selecting a feature each time I touch the map. > So basically, what I want to achieve is, to drag and zoom the map in any > case, even if I hold down on a feature. This is my code for the > selectFeature control: > > clickFeature = new OpenLayers.Control.SelectFeature( > [pointLayer], > { > clickout: true, toggle: false, > multiple: false, hover: false, > } > ); > map.addControl(clickFeature); > pointLayer.events.on({ > "featureselected": function(e) { > //drag.activate(); > > //openDetail(e.feature.attributes.Id); > ajax_request('mob_detail.php','POST','?t=1&id='+e.feature.attributes.Id,'mob_detailLayer'); > closeToolTip(); > //dumpProps(e.feature.attributes); > > //document.getElementById("debug").value=e.feature.attributes.Id; > }, > "featureunselected": function(e) { > closeDetail(); > } > }); > > clickFeature.activate(); > > > > > > This is the link to the current application: > www.linie11.org/mapApp/go_map.php > Any ideas? Thanks in advance! It's driving me crazy right now... > > Cheers, > Freddy > > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users -- Andreas Hocevar Geospatial Solutions Engineer | Boundless [email protected] @boundlessgeo _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
