How to use the ngeo/misc/debounce.js.name function in ngeo

To help you get started, we’ve selected a few ngeo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github camptocamp / ngeo / src / routing / RoutingComponent.js View on Github external
import 'ngeo/sass/font.scss';


/**
 * @typedef {Object} RoutingVia
 * @property {?import("ol/Feature.js").default} feature
 * @property {function(import('ngeo/routing/NominatimService').NominatimSearchResult)} onSelect
 */


/**
 * @type {!angular.IModule}
 * @hidden
 */
const module = angular.module('ngeoRoutingComponent', [
  ngeoMiscDebounce.name,
  ngeoMiscFilters.name,
  ngeoRoutingNominatimService.name,
  ngeoRoutingRoutingService.name,
  ngeoRoutingRoutingFeatureComponent.name
]);


module.run(/* @ngInject */ ($templateCache) => {
  // @ts-ignore: webpack
  $templateCache.put('ngeo/routing/routing', require('./routing.html'));
});


module.value('ngeoRoutingTemplateUrl',
  /**
   * @param {!angular.IAttributes} $attrs Attributes.
github camptocamp / ngeo / src / routing / NominatimService.js View on Github external
asyncResults([]);
    } else {
      syncResults([]);
    }
  };

  this.search(query, {}).then(onSuccess_, onError_);
};


/**
 * @type {angular.IModule}
 * @hidden
 */
const module = angular.module('ngeoNominatimService', [
  ngeoMiscDebounce.name
]);

module.service('ngeoNominatimService', NominatimService);


export default module;
github camptocamp / ngeo / src / misc / extraModule.js View on Github external
import ngeoMiscFilters from 'ngeo/misc/filters.js';
import ngeoMiscGetBrowserLanguage from 'ngeo/misc/getBrowserLanguage.js';
import ngeoMiscSortableComponent from 'ngeo/misc/sortableComponent.js';
import ngeoMiscTime from 'ngeo/misc/Time.js';
import ngeoMiscToolActivateMgr from 'ngeo/misc/ToolActivateMgr.js';
import ngeoMiscWMSTime from 'ngeo/misc/WMSTime.js';

/**
 * @type {!angular.IModule}
 */
export default angular.module('ngeoMiscExtraModule', [
  ngeoMiscAutoProjection.name,
  ngeoMiscBtnComponent.name,
  ngeoMiscControlComponent.name,
  ngeoMiscDatepickerComponent.name,
  ngeoMiscDebounce.name,
  ngeoMiscEventHelper.name,
  ngeoMiscFeatureHelper.name,
  ngeoMiscFile.name,
  ngeoMiscFilereaderComponent.name,
  ngeoMiscFilters.name,
  ngeoMiscGetBrowserLanguage.name,
  ngeoMiscSortableComponent.name,
  ngeoMiscTime.name,
  ngeoMiscToolActivateMgr.name,
  ngeoMiscWMSTime.name,
]);
github camptocamp / ngeo / contribs / gmf / src / lidarprofile / Manager.js View on Github external
this.getProfileByLOD(clip.clippedLine, clip.distanceOffset, false, 0);

      }
    }

    this.plot.previousDomainX = domainX;
  }
}


/**
 * @type {angular.IModule}
 * @hidden
 */
const module = angular.module('gmfLidarprofileManager', [
  ngeoMiscDebounce.name,
]);
module.service('gmfLidarprofileManager', LidarprofileManager);

export default module;
github camptocamp / ngeo / src / offline / NetworkStatus.js View on Github external
}

  /**
   * @return {boolean} True if we are disconnected.
   * @export
   */
  isDisconnected() {
    return !!this.offline_;
  }
};


const name = 'ngeoNetworkStatus';

Service.module = angular.module(name, [
  ngeoMiscDebounce.name
]);
Service.module.service(name, Service);


/**
 * @ngInject
 * @param {angular.IQService} $q The Angular $q service.
 * @param {import("ngeo/misc/debounce.js").miscDebounce} ngeoDebounce ngeo debounce service.
 * @param {Service} ngeoNetworkStatus ngeo network status service.
 * @return {angular.IHttpInterceptor} the interceptor
 */
const httpInterceptor = function($q, ngeoDebounce, ngeoNetworkStatus) {
  const debouncedCheck = ngeoDebounce(() => ngeoNetworkStatus.check(undefined), 2000, false);
  return {
    request(config) {
      return config;
github camptocamp / ngeo / src / olcs / Service.js View on Github external
*/
  remove3dState_() {
    this.ngeoLocation_.getParamKeysWithPrefix(Permalink3dParam.PREFIX).forEach((key) => {
      this.ngeoStateManager_.deleteParam(key);
    });
  }

};


/**
 * @type {!angular.IModule}
 * @hidden
 */
const module = angular.module(name, [
  ngeoMiscDebounce.name,
  ngeoStatemanagerLocation.name,
  ngeoStatemanagerService.name,
]).service('ngeoOlcsService', OlcsService);


export default module;