How to use Gmap modules JavaScript functions?

Hi

The following is javascript defined in Gmap module. I can’t figure out that how could I use these functions?
If I call ‘obj.delmarker(marker);’ inside markerloader_static.js it says that delmarker isn’t a function.

/**
 * @file
 * GMap Markers
 * GMap API version -- No manager
 */

/*global Drupal, GMarker */

// Replace to override marker creation
Drupal.gmap.factory.marker = function (opts) {
    return new google.maps.Marker(opts);
};

Drupal.gmap.addHandler('gmap', function (elem) {
    var obj = this;

    obj.bind('addmarker', function (marker) {
        if (!obj.map.markers) obj.map.markers = [];
        marker.marker.setMap(obj.map);
        obj.map.markers.push(marker.marker);
    });

    obj.bind('delmarker', function (marker) {
        marker.marker.setMap(null);
    });

    obj.bind('clearmarkers', function () {
        // @@@ Maybe don't nuke ALL overlays?
        if (obj.map.markers) {
            for (var i = 0; i < obj.map.markers.length; i++) {
                obj.map.markers[i].setMap(null);
            }
        }
    });
});
//markerloader_static.js

/* $Id: markerloader_static.js,v 1.3 2009/02/11 19:30:22 bdragon Exp $ */

/**
 * @file
 * GMap Marker Loader
 * Static markers.
 * This is a simple marker loader to read markers from the map settings array.
 * Commonly used with macros.
 */

/*global Drupal */

// Add a gmap handler
Drupal.gmap.addHandler('gmap', function (elem) {
    var obj = this;
    var marker, i;
    var map = obj.map;



    obj.bind('addmarker', function (marker) {
        //var m = Drupal.gmap.factory.marker(marker.opts);
        //marker.marker = m;

        google.maps.event.addListener(marker.marker, 'click', function () {
           obj.delmarker(marker); // This line here causes error "Uncaught TypeError: obj.delmarker is not a function"
         
            console.log('click');
         
        });
    });

    if (obj.vars.markers) {
        console.log('yes, markers')
        // Inject markers as soon as the icon loader is ready.
        obj.bind('iconsready', function () {
            console.log('iconsready');

            for (i = 0; i < obj.vars.markers.length; i++) {
                marker = obj.vars.markers[i];
                if (!marker.opts) {
                    marker.opts = {};
                }

              
                marker.opts.text = '';
                marker.autoclick = 'false';

                // Pass around the object, bindings can change it if necessary.
                obj.change('preparemarker', -1, marker);
                // And add it.
                if (marker && marker.marker == undefined) {
                    obj.change('addmarker', -1, marker);
                }

            }
            obj.change('markersready', -1);
        });
    }


});

Drupal version: 


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