openMapFromBuffer use length in map header