         return layerXML;
     }
 
-    private function isAllowedType(type:String):Boolean
+    private function isNonEsriType(type:String):Boolean
     {
         return type == "OpenStreetMap" ||
             (isBingBasemap(type) && hasBingKey());

        {
            layerXML = createTiledLayerXML(title, iconURL, url, basemapLayerObject, false);
        }
        else if (isAllowedType(type))
        {
            layerXML = createNonEsriLayerXML(title, iconURL, basemapLayerObject, false, type);
        }


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