'use strict';
define(function() {
  var toolbarbasemap = function() {
    return {
      templateUrl:
        'js/XG/widgets/mapapp/selectFeatureTree/views/toolbarbasemap.html',

      restrict: 'A',

      link: function(scope, element, attrs, ctrl) {
        var m = scope.map;
        var cf = scope.config;

        // alert (m);
        element.bind('click', function() {
          //alert(m);
          scope.addtools({
            title: 'selectfeaturetree.widgetname',
            name: 'Boite Info',
            directive: 'selectfeaturetreewidget',
          });
          try {
            scope.$apply(scope);
          } catch(err) {}
        });
      },
    };
  };

  toolbarbasemap.$inject = [];
  return toolbarbasemap;
});
