 
     private function portalItem_getJSONDataResultHandler(itemData:Object, item:PortalItem):void
     {
-        createBasemapLayerObject(itemData, item);
+        createBasemapLayerObjectFromWebMapItemAndData(item, itemData);
         if (isDefaultBasemap(itemData.baseMap))
         {
             defaultBasemapTitle = itemData.baseMap.title;

        updateTotalArcGISBasemaps();
    }

    private function createBasemapLayerObject(itemData:Object, item:PortalItem):void
    {
        if (!itemData)
        {

        return layerXML;
    }

    private function isNonEsriType(type:String):Boolean
    {
        return type == "OpenStreetMap" ||
            (isBingBasemap(type) && hasBingKey());
