src/coord/geo/geoCreator.js
function (originRegionArr, mapName, nameMap) {
        // Not use the original
        var regionsArr = (originRegionArr || []).slice();

        var dataNameMap = zrUtil.createHashMap();
        for (var i = 0; i < regionsArr.length; i++) {
            dataNameMap.set(regionsArr[i].name, regionsArr[i]);
        }

        var source = geoSourceManager.load(mapName, nameMap);
        zrUtil.each(source.regions, function (region) {
            var name = region.name;
            !dataNameMap.get(name) && regionsArr.push({name: name});
        });

        return regionsArr;
    }
function (originRegionArr, mapName, nameMap) {
        // Not use the original
        var regionsArr = (originRegionArr || []).slice();

        var dataNameMap = zrUtil.createHashMap();
        for (var i = 0; i < regionsArr.length; i++) {
            dataNameMap.set(regionsArr[i].name, regionsArr[i]);
        }

        var source = geoSourceManager.load(mapName, nameMap);
        zrUtil.each(source.regions, function (region) {
            var name = region.name;
            !dataNameMap.get(name) && regionsArr.push({name: name});
        });

        return regionsArr;
    }
function ( originRegionArr , mapName , nameMap ) { // Not use the original var regionsArr = ( originRegionArr || [ ] ) . slice ( ) ; var dataNameMap = zrUtil . createHashMap ( ) ; for ( var i = 0 ; i < regionsArr . length ; i ++ ) { dataNameMap . set ( regionsArr [ i ] . name , regionsArr [ i ] ) ; } var source = geoSourceManager . load ( mapName , nameMap ) ; zrUtil . each ( source . regions , function ( region ) { var name = region . name ; ! dataNameMap . get ( name ) && regionsArr . push ( { name : name } ) ; } ) ; return regionsArr ; }
Fill given regions array
@param  {Array.<Object>} originRegionArr
@param  {string} mapName
@param  {Object} [nameMap]
@return {Array}
Fill given regions array