Strange message while debugging with Aptana Studio 3 - Unable to Create Map

Discussion created by hubertlo on Aug 7, 2012
Latest reply on Sep 26, 2012 by rjcoleman
I have been modifying one of the templates downloaded from to make my own customized solution. I have been adding extra Dojo widgets (DataGrid and AccordianContainer) to the JavaScript project. I have no problem running it but when I try to debug the application using Aptana Studio 3, I encounter a strange message box from time to time. When I see this message box, the Aptana Studio debugger will not get into the break point either. Meanwhile there is no runtime error when I run in the browser.

If there is a better way to debug than using Aptana debug mode, please let me know how. I use Aptana mainly for the code assist for the esri api and dojo.

The message box says:

Unable to create map: "Wrong number of arguments or invalid property assignment".


What can I do? What could be missing in html and javascripts?

Further investigations. I can debug part way into the initial Javascript functions. When it goes into a function called "function createMap(webmapitem)" and when it get to "mapDeferred.addCallback(function(response)", it went straight to the "mapDeferred.addErrback(function(error)" where the alert box is shown. Why? Why? Why?

function createMap(webmapitem){
    var mapDeferred = esri.arcgis.utils.createMap(webmapitem, "map", {
        mapOptions: {
            slider: configOptions.displaySlider,
            nav: false,
            wrapAround180: !configOptions.constrainmapextent,
            showAttribution: true,
            //set wraparound to false if the extent is limited.
            logo: !configOptions.customlogo.image //hide esri logo if custom logo is provided
        ignorePopups: false,
        bingMapsKey: configOptions.bingmapskey

        //add webmap's description to details panel
        if (configOptions.description === "") {
            if (response.itemInfo.item.description !== null) {
                configOptions.description = response.itemInfo.item.description;