Why isn't Drupal.gmap.addHandler() executed inside Drupal-behaviors?


I’ve made following javascript which works executes fine to the console.log but nothing after that is fired:

(function ($) {
    Drupal.behaviors.gmap = {
        attach: function (context, settigs) {
            console.log('attach'); // Work fine until this log
            Drupal.gmap.addHandler('gmap', function (elem) {
                console.log('this is not logged until moving between steps');
                var obj = this;
                var locations = [];
                var markers = [];

                function setValue() {
                    locations = [];
                    Object.keys(markers).forEach(function (marker) {


However, this code is used in a multistep Webform and if I goto next step and come back then the second console.log is also executed.

And the second console.log of detach function doesn’t execute at all:

 detach: function (context, settings) {
            jQuery('.gmap-processed').each(function (element) {
                console.log('detach 2');
                //find mapid
                var id = jQuery(this).attr('id');
                var mapid = id.split('-', 2);

                //unload map

I can use other method to add neede functionality and which work fine with attach detach.
This Drupal.gmap.addHandler is somehow different?

Drupal version: 

Source: https://www.drupal.org/taxonomy/term/4/feed