How to use the @terrestris/base-util/dist/Logger.debug function in @terrestris/base-util

To help you get started, we’ve selected a few @terrestris/base-util 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 terrestris / react-geo / src / Field / ScaleCombo / ScaleCombo.tsx View on Github external
getOptionsFromMap = () => {
    const {
      map,
      resolutionsFilter
    } = this.props;

    if (!_isEmpty(this.state.scales)) {
      Logger.debug('Array with scales found. Returning');
      return [];
    }
    if (!map) {
      Logger.warn('Map component not found. Could not initialize options array.');
      return [];
    }

    let scales = [];
    let view = map.getView();
    // use existing resolutions array if exists
    let resolutions = view.getResolutions();
    if (_isEmpty(resolutions)) {
      for (let currentZoomLevel = view.getMaxZoom(); currentZoomLevel >= view.getMinZoom(); currentZoomLevel--) {
        let resolution = view.getResolutionForZoom(currentZoomLevel);
        if (resolutionsFilter(resolution)) {
          this.pushScale(scales, resolution, view);
github terrestris / ol-util / src / MapUtil / MapUtil.js View on Github external
static getInteractionsByName(map, name) {
    let interactionCandidates = [];

    if (!(map instanceof OlMap)) {
      Logger.debug('Input parameter map must be from type `ol.Map`.');
      return interactionCandidates;
    }

    let interactions = map.getInteractions();

    interactions.forEach(function(interaction) {
      if (interaction.get('name') === name) {
        interactionCandidates.push(interaction);
      }
    });

    return interactionCandidates;
  }
github terrestris / ol-util / src / MapUtil / MapUtil.js View on Github external
static getInteractionsByClass(map, clazz) {
    let interactionCandidates = [];

    if (!(map instanceof OlMap)) {
      Logger.debug('Input parameter map must be from type `ol.Map`.');
      return interactionCandidates;
    }

    let interactions = map.getInteractions();

    interactions.forEach(function(interaction) {
      if (interaction instanceof clazz) {
        interactionCandidates.push(interaction);
      }
    });

    return interactionCandidates;
  }