Announcement

Collapse
No announcement yet.

extending the handlers/map/renderer using AMD i get an error as below

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • extending the handlers/map/renderer using AMD i get an error as below

    Another issues, currently facing is when extending the handlers/map/renderer using AMD i get an error as below (I am using the ext-template with AMD)

    Uncaught (in promise) TypeError: Dep.extend is not a function

    Below my custom renderer

    PHP Code:
    define('plus-map:handlers/map/tomtom-map-renderer', ['handlers/map/renderer'], function (Dep) {
        
        return 
    Dep.extend({

            
    /**
             * @param {module:handlers/map/renderer~addressData} addressData
             */
            
    render: function (addressData) {
                if (
    'tomtom' in window && window.tomtom.map) {
                    
    // rest of my code
                
    }
            },
        });
    }); 
    Last edited by rabii; 03-04-2024, 03:07 PM.
    Rabii
    Web Dev

  • #2
    Because ES6 classes are not extended with the extend method. Dep.extend is a legacy. Use official javascript classes.

    Comment

    Working...
    X