2

how can one unselect all Features with jquery dialog close button function in openlayers 2.13?

View Entire Project Here (some buildings are not yet clickable)

incorrect code:

OpenLayers.layer.selectedFeatures.unselectAll()

code in relation to function:

        var selectControlClicks = new OpenLayers.Control.SelectFeature(vectorLayer, {
        onSelect: function(feature) {
            $.get( "infoget.php", { name: feature.attributes.name } )
                .done(function( data ) {
                    var options = {
                        $FillMode: 1,
                        $DragOrientation: 1,                                
                        $ArrowNavigatorOptions: {       
                            $Class: $JssorArrowNavigator$, 
                            $ChanceToShow: 2,  
                            $AutoCenter: 0,  
                            $Steps: 1 
                        }
                    };
                    dialog = $( data ).dialog({ minHeight: 390,maxHeight: 390,draggable: false,close: function( event, ui ) {OpenLayers.layer.selectedFeatures.unselectAll()}} ).tabs();
                    var jssor_slider1 = new $JssorSlider$("slider1_container", options);
                });
        },
        onUnselect: function(feature) {
            dialog.dialog("destroy").remove();
        },
    });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.