<commit_before>/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


/* global handleResponse, requestWmsGFI, buildWMSOtions */

Ext.define("viewer.viewercontroller.ol.tools.OlIdentifyTool",{
    extend: "viewer.viewercontroller.ol.OlTool",
    map: null,
    deactivatedControls: null,
    wmsGetFeatureInfoControl:null,
    wmsGetFeatureInfoFormat: "application/vnd.ogc.gml",
    useWMSGetFeatureInfo:null,
    active: false,
    layersToAdd:null,
    config: {
        maxFeatures: 1000
    },
    /**
     * Constructor
     * @param conf the configuration object
     * @param frameworkTool the openlayers control
     * @param map the viewer.viewercontroller.openlayers.OpenLayersMap
     */
    constructor : function (conf){
        this.useWMSGetFeatureInfo=true;
        
        conf.id = conf.tooltip;
        conf.class = "olControlIdentify";
        conf.onlyClick = false;
        conf.actives =false;


        this.mapComponent = conf.viewerController.mapComponent;
        viewer.viewercontroller.ol.tools.OlIdentifyTool.superclass.constructor.call(this,conf,this);
        this.map=this.config.viewerController.mapComponent.getMap();
        
        this.getViewerController().mapComponent.getMap().addListener(viewer.viewercontroller.controller.Event.ON_LAYER_ADDED,this.onAddLayer,this);
        this.getViewerController().mapComponent.getMap().addListener(viewer.viewercontroller.controller.Event.ON_LAYER_REMOVED,this.onRemoveLayer,this);
        
        //this.setUseWMSGetFeatureInfo(this.useWMSGetFeatureInfo);
        
        return this;
    },
    
    activate: function(){
        this.conf.actives =true;
        this.tempKey = this.mapComponent.maps[0].getFrameworkMap().on('singleclick',function(evt){  
            var crd = evt.coordinate;
            var pix = evt.pixel;
            
            var options ={
            x:pix[0],
            y:pix[1],
            coord: {
                x:crd[0],
                y:crd[1]
            }
        };
            this.handleClick(this,options);
        },this);
    },
    
    deactivate: function(){<commit_msg>changed the scope to 'me'<commit_after>/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


/* global handleResponse, requestWmsGFI, buildWMSOtions */

Ext.define("viewer.viewercontroller.ol.tools.OlIdentifyTool",{
    extend: "viewer.viewercontroller.ol.OlTool",
    map: null,
    deactivatedControls: null,
    wmsGetFeatureInfoControl:null,
    wmsGetFeatureInfoFormat: "application/vnd.ogc.gml",
    useWMSGetFeatureInfo:null,
    active: false,
    layersToAdd:null,
    config: {
        maxFeatures: 1000
    },
    /**
     * Constructor
     * @param conf the configuration object
     * @param frameworkTool the openlayers control
     * @param map the viewer.viewercontroller.openlayers.OpenLayersMap
     */
    constructor : function (conf){
        this.useWMSGetFeatureInfo=true;
        
        conf.id = conf.tooltip;
        conf.class = "olControlIdentify";
        conf.onlyClick = false;
        conf.actives =false;


        this.mapComponent = conf.viewerController.mapComponent;
        viewer.viewercontroller.ol.tools.OlIdentifyTool.superclass.constructor.call(this,conf,this);
        this.map=this.config.viewerController.mapComponent.getMap();
        
        this.getViewerController().mapComponent.getMap().addListener(viewer.viewercontroller.controller.Event.ON_LAYER_ADDED,this.onAddLayer,this);
        this.getViewerController().mapComponent.getMap().addListener(viewer.viewercontroller.controller.Event.ON_LAYER_REMOVED,this.onRemoveLayer,this);
        
        //this.setUseWMSGetFeatureInfo(this.useWMSGetFeatureInfo);
        
        return this;
    },
    
    activate: function(){
        var me = this;
        this.conf.actives =true;
        this.tempKey = this.mapComponent.maps[0].getFrameworkMap().on('singleclick',function(evt){  
            var crd = evt.coordinate;
            var pix = evt.pixel;
            
            var options ={
            x:pix[0],
            y:pix[1],
            coord: {
                x:crd[0],
                y:crd[1]
            }
        };
            me.handleClick(me,options);
        },this);
    },
    
    deactivate: function(){
{'fraction_non_alphanumeric': 0.1068973164781548, 'fraction_numerical': 0.003992015968063872, 'mean_word_length': 2.509727626459144, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2897153', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1319, 'n_words': 220}